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

Support fractional minzoom values #2929

Closed
vicapow opened this issue Aug 2, 2016 · 7 comments
Closed

Support fractional minzoom values #2929

vicapow opened this issue Aug 2, 2016 · 7 comments

Comments

@vicapow
Copy link
Contributor

vicapow commented Aug 2, 2016

minzoom and maxzoom on layers don't seem to respect floating point values and instead round up.

Here's a quick demo: https://jsfiddle.net/oopkjeak/16/

If this is expected, maybe the docs should mention this and style validators should check for integers?

Otherwise, it would be awesome to support floating point values!

@shortsleeves
Copy link

FWIW - The style spec seems to indicate floats should be valid: #layer-minzoom

@lucaswoj lucaswoj changed the title minzoom and maxzoom behavior with floating point values Support fractional minzoom and maxzoom values Aug 2, 2016
@lucaswoj
Copy link
Contributor

lucaswoj commented Aug 2, 2016

This is not but could be supported 😄

@lucaswoj
Copy link
Contributor

lucaswoj commented Aug 2, 2016

Let me know if there is anything I can to do help you put together a PR @vicapow. 🙇

@mollymerp
Copy link
Contributor

fwiw maxzoom seems to respect float values https://jsfiddle.net/cmozpyyk/

@lucaswoj lucaswoj changed the title Support fractional minzoom and maxzoom values Support fractional minzoom values Aug 3, 2016
@vicapow
Copy link
Contributor Author

vicapow commented Aug 3, 2016

@lucaswoj I spent some time digging but wasn't able to find where this is happening. Any pointers on where to look? really odd that this happens for min but not max.

@lucaswoj
Copy link
Contributor

lucaswoj commented Aug 3, 2016

My theory is that the library that creates vector tiles, geojson-vt, is generating tiles from floor(minzoom) to floor(maxzoom). We can overzoom to render tiles > maxzoom but we cannot "underzoom" to render tiles < minzoom. The fix may be to explicitly ceil(minzoom) before passing it to geojson-vt

@asheemmamoowala
Copy link
Contributor

Close in #5039

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

No branches or pull requests

5 participants