On Apr 20, 4:03 pm, Kontaktschmied <[email protected]>
wrote:
>
> I wish to autozoom the map. With single polyline I can get the bounds
> width the command getBounds().  How I can get the bounds if I have
> multiple polylines  in my overlay?

Create a global bounds object. Loop through each polygon and extend
the global object with each polygon's bounds' SW and NE corners.

var globalBounds = new GLatLngBounds();
globalBounds.extend(poly1.getBounds().getSouthWest());
globalBounds.extend(poly1.getBounds().getNorthEast());

[Use a loop to iterate through each of your polygons]

Unfortunately you can only extend GLatLngBounds by adding a single
point, rather than a whole polygon or another GLatLngBounds object.

Andrew
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to