Note that you shouldn't need to set a zoom first. Just call fitBounds. On Fri, Sep 10, 2010 at 11:06 PM, Johan Arensman <[email protected]> wrote: > Hey, > > Just initialize your map with any zoom and then use fitBounds to fit your > map to the bounds: > > var bounds = new google.maps.LatLngBounds(southWest,northEast); > > > map.fitBounds(bounds); > > Greets, > Johan > > > On Fri, Sep 10, 2010 at 2:44 PM, 23yen <[email protected]> wrote: >> >> Hi, >> >> I'd like to know if there is a method to get the zoom that correspond >> to bounds (to display everything within these bounds), before >> initilaizing the map. In other words, I know the center and bounds, >> but I'd like to retrieve the zoom, to be able to initialize a map >> (zoom being required when creating a map). >> >> Thanks in advance, >> >> 23yen >> >> -- >> 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. >> > > -- > 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. >
-- 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.
