Return to Snippet

Revision: 46248
at May 14, 2011 22:03 by marzsman


Initial Code
var latlngbounds = new google.maps.LatLngBounds();
for ( var i=0; i<route.length; i++ ){
     latlngbounds.extend(route[i]);
}
map.setCenter( latlngbounds.getCenter(), map.fitBounds(latlngbounds));

Initial URL


Initial Description
Center the map on an array of latlng values

Initial Title
Zoom and fit bounds Google maps V3

Initial Tags
javascript, google

Initial Language
JavaScript