On Sep 5, 4:09 pm, CanamGroup <[EMAIL PROTECTED]> wrote: > Let's say all my markers are in America... then I add one in > Australia. The bound is extended and the map zoom out automatically. > If I delete the marker in Australia, I'd like to decrease the bound to > zoom in the map automatically.
There isn't a GLatLngBounds.reduce method, as presumably you've found via the documentation. This isn't entirely surprising if a GLatLngBounds object is maintained *only* as its extents. When you extend it, the extents are expanded if necessary so that the new point is accommodated. A GLatLngBounds object doesn't actually hold all the points themselves. To recalculate the bounds, the API would have to maintain a log of the points it contained in order to find the extent of the points which were left when you removed one. Basically the way that's actually done would be to extend a zero bounds with each of the remaining points in order to find the new bounds. You can do that too. 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 -~----------~----~----~----~------~----~------~--~---
