I used bounds_changed and zoom_changed, making any checks.
A thousand thanks to Rossko and Chad Killingsworth.

Davide

On 5 Nov, 21:31, Chad Killingsworth
<chadkillingswo...@missouristate.edu> wrote:
> Or even better, listen to zoom_changed.
>
> Chad Killingsworth
>
> On Nov 5, 3:09 pm, Rossko <ros...@culzean.clara.co.uk> wrote:
>
>
>
> > > When you set the options of the map, I set the zoom to 7, then when I
> > > do fitBounds the map decrease
> > >  Zoom and therefore requires getZoom but it brings back the 7!
>
> > Yes.  A lot of things happen in the v3 API asynchronously, which means
> > fitBounds probably hasn't actually completed by the time your next
> > line (like getZoom) is executed.
> > If you know that fitBounds is sure to actually change the view, you
> > could listen for the map event bounds_changed and then read the zoom
> > level.- Nascondi testo citato
>
> - Mostra testo citato -

-- 
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 google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to