Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map#setMaxZoom caps maxZoom at 20 #3677

Closed
jlaxson opened this issue Nov 22, 2016 · 1 comment · Fixed by #3683
Closed

Map#setMaxZoom caps maxZoom at 20 #3677

jlaxson opened this issue Nov 22, 2016 · 1 comment · Fixed by #3683
Assignees
Labels

Comments

@jlaxson
Copy link

jlaxson commented Nov 22, 2016

It is possible to initialize a map using options that specify an arbitrary maxZoom (Transform's default is 22). However, Map#setMaxZoom will refuse to later set any value above 20.

setMaxZoom with this behavior was added by #2235 and #2243, but I can't find anywhere in the issue history or commit logs where it is explicitly said that this was intentional or necessary.

I have some high resolution rasters whose tiles reach their native resolution at zooms 22-24.

mapbox-gl-js version: 0.28.0

Steps to Trigger Behavior

http://jsbin.com/sozesekomi/edit?html,js,output

  1. Initialize map with maxZoom greater than 20. This works and map can zoom way in.
  2. Call setMaxZoom with another value greater than 20

Expected Behavior

Max zoom is adjusted to given value, and current zoom is clamped as necessary.

Actual Behavior

Error thrown that maxZoom must be between minZoom and 20.

@mourner mourner assigned 1ec5 and peterqliu and unassigned 1ec5 Nov 22, 2016
@1ec5
Copy link
Contributor

1ec5 commented Nov 22, 2016

Relatedly, mapbox/mapbox-gl-native#7155 tracks increasing the maximum zoom level beyond 21 in the native SDKs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants