Hi,

I am using given below code for point the particular place in google map. It's working. But i tried more than 1 place for focus. At time i change the given below code. But it's not working. Any one help me?

<?php
session_start();
$title = 'Record - View Map';
include('header1.php');
$id = $_REQUEST['rid'];
if($id!='')
{
$sql = "select * from townshiprecord where id=".$id;
$value = mysql_query($sql);
$result = mysql_fetch_assoc($value);
$docket = $result['docket'];
$place = $result['address1'];
$city = $result['city'];
$county = $result['county'];
$zipcode = $result['zipcode1'];
$location = $place." ".$city." ".$county." ".$zipcode;
}
?>
<script type="text/javascript">
var map;
var geocoder;
function initialize()
{
map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(34, 0), 15);
geocoder = new GClientGeocoder();
}

function addAddressToMap(response)
{
map.clearOverlays();
if (!response || response.Status.code != 200)
{
alert("Sorry, we were unable to geocode that address");
}
else
{
place = response.Placemark[0];
point = new GLatLng(place.Point.coordinates[1],
place.Point.coordinates[0]);
marker = new GMarker(point);
map.addOverlay(marker);
marker.openInfoWindowHtml('<span style="font-family:Arial, Helvetica, sans-serif; font-size:0.79em; font-weight:normal; color:#383838;"><b><?=$docket?></b>:<br> <?=$place?>,<br><?=$city?>,<br><?=$county?> <?=$zipcode?></span>');
}
}

function showLocation()
{
var address = document.getElementById("map").value;
geocoder.getLocations(address, addAddressToMap);
}

// findLocation() is used to enter the sample addresses into the form.
function findLocation(address)
{
document.getElementById("map").value = address;
showLocation();
}
</script>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQ IAAAA_t5n9gHLuKJGH0boZw1LfxSYCFBB9ZrY1S_MBw6vXfKfF JP2axQ2u0385dad9DiBeiAe00805hPWMw" type="text/javascript"></script>
<body onselectstart="return false" oncontextmenu="return false" onLoad="initialize(),findLocation('<?=$location?>' )" onUnload="GUnload()" ondragstart="return false" onMouseOver="window.status='..message Personal'; return true;" ..>
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="pageheading1">Record - View Map</td>
</tr>
<tr>
<td style="height:10px;"></td>
</tr>
<tr>
<td><table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td align="left" style="width:100%">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td class="pageheading1" width="50%" align="left">
</td>
<td align="right"><a href="<?=$_REQUEST['page']?>.php" class="adminmenu">Back</a></td>
</tr></table>
</td></tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td>
<form action="" method="post">
<input type="hidden" name="q" id="map" value="" size="40" />
<div id="map_canvas" style="width: 658px; height: 480px"></div>
</form>
</td>
</tr>
<tr><td>&nbsp;</td></tr>
</table></td>
</tr>
</table>
<?php
include('footer.php');
?>


Thanks,
Thirumalai.S