tags:

views:

23

answers:

1

I have a set of markers on google map (say 6). Now i want to zoom in only to certain level that displays all markers well for that i used getBoundsZoomLevel().

Problem is I dont know how to determine the BOUNDS from array of latitude and longitude.

Can somebody tell me how to determine south-west and north-east point for a bound???

I found this one post but i m not able to understand it as i dont know what is DIST... http://stackoverflow.com/questions/1605805/southwest-and-northeast-points

A: 

Take a look at LatLngBounds http://code.google.com/apis/maps/documentation/javascript/reference.html#LatLngBounds

As you added new LatLngs you can call extend(point:LatLng), the bounds will then contain all of your added LatLngs.

Ossama
hi thanks for replying. I already use extend when i am adding markers. What i want to do is when a user selects 2 or 3 or more markers then i want to zoom map in such a way that contains all the SELECTED MARKERS. so for this i need to determine northeast and southwest points from arrays of latitude and longitude
So, create a new LatLngBounds object and add the markers that the user selects into it.
Ossama