> I've got a simple map and I want to set it's exact bounds.

You can't ; zoom is only available in integer levels, so a map of
fixed viewing pane size cannot be exactly fitted to any particular
bounds.   Then there's the issue of proportions ; if your bounds were
square and the viewport rectangular an exact fit cannot be achieved.
"Square" is itself pretty meaningless here, due to looking at a curved
world's surface through the distortion of Mercator's projection.

The fitBounds method does what it can to give a map view that
_includes_ the given bounds, but usually includes a bit more too.
What you see is how it is intended to work.

If you want to change the map centre without changing the zoom, you
can.

I guess you could write some complicated code that actually resized
the map pane somewhere in between a minimum size and a maximum twice
as big, to give a good fit to bounds ; it would look a bit weird in
action though.

-- 
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