On Jun 19, 6:40 pm, Andrew Leach <[email protected]>
wrote:
>
> I'm not entirely sure why you are creating a bounds object which
> contains all the markers and then zooming in as far as you can on its
> centre....
I suppose you might calculate a zoom level which is too far in. So
this might be better:
var calcZoom = map.getBoundsZoomLevel(spBounds); // global
var latlng = spBounds.getCenter(); // global
map.getCurrentMapType().getMaxZoomAtLatLng(latlng,
function (response) {
if (response && response['status'] == G_GEO_SUCCESS) {
if (response['zoom'] < calcZoom) { calcZoom=response['zoom'] }
map.setCenter(latlng, calcZoom);
}
});
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---