Create a LatLngBounds, and for each marker, extend it to include the point of that person's Location.
Then use Map.fitBounds http://code.google.com/apis/maps/documentation/javascript/reference.html#LatLngBounds On Mon, Oct 11, 2010 at 4:16 PM, Akhi <[email protected]> wrote: > Hi All, > > I am using the google map API V2 with my site. This is a social > networking site. I want to marks my friends in google map. Thats fine, > I had done it. But my client have one more requirement. He want to > zoom and zoom out map based on the nearest 5 friends, because he want > to view that 5 friends without zoom out. Suppose that 5 friend's > locations are very close to me I want very close zooming. If anybody > knows about control zooming based on marker, please let me know? > > Thanks in advance, > Regards, > Akhilesh PV > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps API V2" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-maps-api%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-api?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
