enabling maxNativeZoom?
jaketangosierra opened this issue · 12 comments
Hi,
I'm trying to use maxNativeZoom (in order to overzoom the tiles at certain zoom levels, ideally so we don't have to generate huge amounts of vector tiles at the higher zoom levels), but it seems to not work for Leaflet.MapboxVectorTile. This breaks expected behavior for something inheriting from L.TileLayer, what would it take to implement this feature? Is there a reason it doesn't exist currently?
Which version of leaflet are you referring to?
0.7.3, the newest stable version.
Honestly, we were not aware that Leadlet does overzooming at this version. I know 1.0 does (which is incomplete). Can you point me to docs or examples of this feature?
It's documented in http://leafletjs.com/reference.html#tilelayer, and if you set the maxNativeZoom option, it'll overzoom between that number and the number set for maxZoom.
Ah. I'd say your request is a valid feature that should be implemented. I'll look into figuring out what needs to be done to make this happen.
Thanks, if it's straightforward I can submit a PR, I just don't know the code for this very well. If I understand the little bit of the code I've read, it looks like all that's needed is passing the option though to L.TileLayer. I'm not sure how that affects Canvas math though.
My thought is that Leaflet just scales the PNG for raster tiles. We would instead want to multiply vector coordinates appropriately either a) when they are being decoded from the PBF or b) when we loop through the arrays and draw to canvas.
I've seen GeoJSON layers that do this as well, but I'm not sure how they implement it. This may help: https://github.com/glenrobertson/leaflet-tilelayer-geojson
Is there any update on this?
Hi @jtsmn, this feature would be a significant undertaking. I don't have the resources right now to do it, but on the next sprint with this library, I can give it a whack. If you'd like to do this yourself, feel free to ask questions, and we can guide you the best we can.
Thanks, I appreciate you looking into it. I may decide to take this on, but
our resources to focus on something like this are limited as well.
If I do push in this direction, I'll certain feel free to ask questions
here. Thanks.
Jacob Thebault-Spieker
PhD Candidate, University of Minnesota
w: http://jacob.thebault-spieker.com
t: @jtsmn
On Wed, Apr 29, 2015 at 11:36 AM, Nicholas Hallahan <
notifications@github.com> wrote:
Hi @jtsmn https://github.com/jtsmn, this feature would be a significant
undertaking. I don't have the resources right now to do it, but on the next
sprint with this library, I can give it a whack. If you'd like to do this
yourself, feel free to ask questions, and we can guide you the best we can.—
Reply to this email directly or view it on GitHub
#20 (comment)
.[image: Web Bug from
https://github.com/notifications/beacon/AF1YvLnpM93brnkC42qJLuKCUKQSO662ks5oEP_9gaJpZM4EFQPv.gif]
This would be a great feature and one that our project would certainly benefit from. I am not sure I am able to code this solution but was curious if this was something the project is still interesting in supporting in the future?