-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Mapbox not able to change the style of vector tiles at run time #6783
Comments
I'm having trouble understanding this. Can you explain in more detail what you're trying to do, what you expected to happen, and what happens instead? If you can create a small code example that shows it, that would be great. |
Okay, can you please create a minimal example that demonstrates the behavior so we can take a look? |
Ok. Sharing a fiddle link. I have created the feature tiles upto zoom level 9. |
Thanks, very clear now! I agree, it seems like a bug. |
So if it is a bug, when can I expect the fix? Can you assist me in some right direction so that I can try to fix it myself ( if it takes more than few days to address it )? |
@Amit-Gore There is a bug in the user code. Its adding a source with maxzoom=22. This means that the source is capable of serving tiles uptil zoom 22. If your source only has tiles uptil zoom 9, then the maxzoom value should be 9.
|
IMHO the documentation around the two meanings of maxzoom and minzoom could be clearer. I recently did some work in this area and it took quite a long time to really understand what's going on:
Quite different meanings of maxzoom, easily confused. |
@mb12 Yes, that should resolve the problem for the scenario inside fiddle. But I have tiles created as per layer specific max zoom and I need to create a single source which joins all those layers tiles. In this case, I will have to provide a range of a zoom in which my source is available to provide tiles which in my case would be from 6 to 22. I think mapbox should implicitly be able to understand the source capability of serving tiles at runtime and should act accordingly. |
Maybe related? #5013 (Overzooming issues after merging tilesets with different maxzoom and buffer sizes in one single source.) |
@mollymerp is this issue has been resolved in the latest 0.46 release? I can still face this issue which has been demonstrated in fiddle link. |
I am using tippecanoe command line utility to create my application vector tileset. This is creating a directory structure as per the z/x/y coordinates which is perfectly fine. I have a certain group of features(allocated with a layer) which do not need z to be up to 21 zoom level so it's creating the tiles up to zoom-level 14. It is critical in my case to not to waste the memory space by increasing the max-zoom to 21 for certain layer of features.
As per my understanding, mapbox gl-js queries for the vector tiles as per its coordinate space.
So during my zoom-in from 6 to 21, although zoom-level > 14 tile queries are responding with 404, gl-js is adopting the same tile which is available at 14.
The problem is,
If at zoom-level > 14, I trigger a style change by any mean upon current layer-tile it's not able to do that.
Is it trying to change the style of a tile which has responded with 404? Is it possible to make it change the available tile source obtained at zoom-level 14?
The text was updated successfully, but these errors were encountered: