Hi ,
Im using code blow to zoom in the city on select from dropdownlist.
It works fine but the only problem is it doesn't zoom in into center
of city :(
I do not really understand why! could anybody help me to find some
solution for this problem?
Many thanks!
/**************************Zooming control ********************/
$zoomcon ="<script type=\"text/javascript\">";
if( $_GET['Country'] !="" && $_GET['State'] =="")
{
$mainLat=getFieldValue("SELECT `Lat` FROM `cities` WHERE
`ID`='{$_GET['Country']}'");
$mainLon=getFieldValue("SELECT `Lng` FROM `cities` WHERE
`ID`='{$_GET['Country']}'");
$zoomcon .="mainlatlon[0] = ";
$zoomcon .="'$mainLat';";
$zoomcon .="mainlatlon[1] = ";
$zoomcon .="'$mainLon';";
$zoomcon .="zoomlevel = ";
$zoomcon .="7;";
}
elseif( $_GET['State'] !="")
{
$smainLat=getFieldValue("SELECT `Lat` FROM `cities` WHERE
`ID`='{$_GET['State']}'");
$smainLon=getFieldValue("SELECT `Lng` FROM `cities` WHERE
`ID`='{$_GET['State']}'");
$zoomcon .="mainlatlon[0] = ";
$zoomcon .="'$smainLat';";
$zoomcon .="mainlatlon[1] = ";
$zoomcon .="'$smainLon';";
$zoomcon .="zoomlevel = ";
$zoomcon .="12;";
}else{
$zoomcon .="mainlatlon[0] = ";
$zoomcon .="'62.0000';";
$zoomcon .="mainlatlon[1] = ";
$zoomcon .="'16.7211';";
$zoomcon .="zoomlevel = ";
$zoomcon .="5;";
}
$zoomcon .="</script>";
echo $zoomcon;
/****************************************************************/
--
You received this message because you are subscribed to the Google Groups
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.