>  But what I find strange is, that
> the call
> map.fitBounds( map.getBounds())
> changes the bounds. In my opinion the fit bounds method wouldn't have
> to do anything.

fitBounds will try to present a map that CONTAINS the bounds you give
it.   Imagine if you had a drawn polygon that size ; if the map fitted
to it perfectly it would not be visible (at the border of the
viewport).  I'm sure this is working as intended.

> I also disabled the UI with "disableDefaultUI: true" in
> MapOptions, because the documentation of the other possible method
> Map.panToBounds() says: "The bounds will be positioned inside the area
> bounded by the map type and navigation controls, if they are present
> on
> the map.".

I would imagine (but haven't checked) that fitBounds also takes into
account the logo and copyright at the bottom and tries to avoid those,
even if you have removed all other controls.

There doesn't seem to be any reason that you couldn't write your own
fitBoundsSpecial() if you don't like the existing behaviour.  The
"real" bounds of the map are available to you, as are methods to
change the zoom and centre, and as you seem to want to ignore any
controls placed on the map you needn't worry about finding out where
they are placed.  I don't know of anyone who has done that already.

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