Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Zooming out below the equator pans the map #114

shawnbot opened this Issue · 2 comments

2 participants


This is a pretty big one. I've whipped up a test case that shows the latitude changing when the map zooms out from a point below the equator. Watch the output as it zooms out 5 times, with a 2-second delay each time. Zooming from 8 to 7 is fine, but then from 7 to 6 produces a change in latitude of .47º. From 6 to 5 is even more extreme: a 5º drift. The longitude is stable.

For each step I'm spitting out the start and end center coordinate and location of each, along with the drift (both as a delta in degrees latitude and longitude and as a percentage of the start), but there doesn't appear to be much of a pattern.

Strangely enough, this problem doesn't show up on, so I'm not sure if this is a new issue or what.

Could it be related to enforceLimits()?


Note that this bug rears its head on TileStache previews (pop open the console and type: map.zoomOut()) as well, which use an older version of MM.

It also causes issues on maps.stamen (click the zoom out button to see the jump).


This is caused by the bottom right coordlimit being 1 instead of infinity here:

Changing it to infinity fixes the bug but I'm not sure what other behavior it modifies - need to take a slightly deeper look.

(second look reveals, duh, this lets users scroll infinitely far down the page)

@tmcw tmcw closed this issue from a commit
@tmcw tmcw Fix enforcePanLimits. This was coded in a way that compared
coordinates across zoom ranges - this fix simply changes
it so that the compare coords are zoomed correctly. This
fixes #114.
@tmcw tmcw closed this in 34db798
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.