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

Add .setMaxZoom/.setMinZoom method #2235

Closed
peterqliu opened this issue Mar 9, 2016 · 5 comments
Closed

Add .setMaxZoom/.setMinZoom method #2235

peterqliu opened this issue Mar 9, 2016 · 5 comments
Assignees

Comments

@peterqliu
Copy link
Contributor

Analogous to #2175, except that it allows setting the zoom bounds after the map is already declared.

@peterqliu
Copy link
Contributor Author

An alternate format could be map.setZoomBounds({min:0, max:20})

@lucaswoj
Copy link
Contributor

This would be awesome!

It think our preferred API would be

map.setZoomBounds(0, 20)

@peterqliu peterqliu self-assigned this Mar 10, 2016
@peterqliu
Copy link
Contributor Author

@lucaswoj super naive stub here. Would appreciate some scope/context around this

@lucaswoj
Copy link
Contributor

@peterqliu Looks like you're on the right track!

Next steps

  • turn this stub into a pull request
  • take minZoom and maxZoom as separate parameters rather than an array
  • document the parameters in the docblock comment above the method.
  • add a way to unset the zoom bounds too
  • add some simple unit tests for this method

Let me know if I can help in any way.

@peterqliu
Copy link
Contributor Author

🚢 #2243

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

No branches or pull requests

3 participants
@lucaswoj @peterqliu and others