Friday, February 11, 2011

[Google Maps API v2] Re: Restricting bounds problem while zooming

On Feb 11, 5:26 am, Cody Turner <turner...@gmail.com> wrote:
> Here is my code:http://riftmap.com/
>
> I am trying to restrict the panning/bounds to what it is at that zoom level.
>
> my problem is... for some reason when you zoom in... the bounds gets smaller
> and smaller. Can someone please help me figure this out??

It's not getting smaller. What's happening is that the area outside
your strictBounds is now shown on a larger number of tiles, so more
tiles are excluded from the viewport.

What you need to do is EITHER not use the map centre to determine how
far you can move it [by testing the viewport edges instead] OR
redefine your strictBounds when the zoom level changes so the centre
can go further.

--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate