Try fitbounds.

You will need to put this at the end of your code;
 var myBounds = new google.maps.LatLngBounds();
   var p1 = new google.maps.LatLng(25.774252, -80.190262);
   var p2 = new google.maps.LatLng(18.466465, -66.118292);
   var p3 = new google.maps.LatLng(32.321384, -64.75737);
   myBounds.extend(p1);
   myBounds.extend(p2);
   myBounds.extend(p3);
   map.fitBounds(myBounds);

Just be sure to change the lat/lng numbers to match your own markers.

http://www.shanebest.com/api3/fitbounds.html

On Jan 25, 8:43 am, Gerry Orkin <[email protected]> wrote:
> I'm showing multiple markers on a map (see 
> examplehttp://whothru.com/aroundme.html), but I have no idea how to have the 
> map
> zoom in to show just the area bounding the markers. I've seen a few
> examples, but I have no idea how to integrate them into my code...because I
> barely know what I'm doing.
>
> Can anyone help?
>
> Cheers
>
> Gerry

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to