Im try to display a custom map in the OverviewMapControl.
This is the function that loads the maps, i need to load a small
G_NORMAL_MAP with same Coordinate and same markers as big map but in
the place of GOverviewMapControl.
But don't work :(
......................................................................................
<script type="text/javascript">
function loadmap() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(<?php echo $lat;?>, <?php echo $lng;?
>), <?php echo $distancia;?>, G_HYBRID_MAP);
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
var marker = new GMarker(new GLatLng(<?php echo $lat;?>, <?php
echo
$lng;?>));
map.addOverlay(marker);
//load the custom OverviewMapControl
var ovcontrol = new GOverviewMapControl(new GSize(165,165));
map.addControl(ovcontrol);
var ov_map = ovcontrol.getOverviewMap();
GEvent.addListener(map, 'maptypechanged', function(){
map.setCenter(new GLatLng(<?php echo $lat;?>, <?php echo $lng;?
>), <?php echo $distancia;?>, G_NORMAL_MAP);
var marker = new GMarker(new GLatLng(<?php echo $lat;?>, <?php echo
$lng;?>));
map.addOverlay(marker);
});
// finish custom GOverviewMapControl
}
}
</script>
.................................................................................................
Sorry for my english!
Thanks in advanced .
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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.