Replies: 4 comments 32 replies
-
We are doing this in the "data level" i.e. when building the tiles we select which features to include in the tiles and which not to include, why not solve it this way? |
Beta Was this translation helpful? Give feedback.
-
@maxammann and I were discussing the other day that expressions are evaluated on the CPU and only at integer zoom levels. The interpolation at the fractional zoom levels is then done on the GPU. I guess this is for performance optimization. @maxammann you said that you can confirm that the shaders only do the interpolation? |
Beta Was this translation helpful? Give feedback.
-
I ended up going with the fork approach for speed of implementation, here's a demo of what the result looks like comparing each feature against it's minzoom to decide whether to show it in the shader: https://msbarry.github.io/maplibre-minzoom-demo |
Beta Was this translation helpful? Give feedback.
-
I ran into similar situation. Since the MVP (most valuable player, not minimum viable product) of data generation While I could benefit from other features as well, most obvious one would be The unfortunate outcome is that all zoom levels pay the price, although the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a use-case where I want to set a fractional "min zoom" attribute on individual features so as you zoom in and out, the feature is visible above that zoom and invisible below it. I don't think there's a way to do this in off-the-shelf maplibre so in the past I've done this in a fork by tweaking the shader but I'm wondering if it would make sense to add as a feature to maplibre.
Ideally I'd be able to do something like:
and that minzoom would get included in the feature's data passed to the gpu and the shader would handle conditionally showing/hiding the feature by comparing to zoom scalar.
A few things I tried using existing style spec:
but it fails with error:
or:
but it fails with:
Does anyone have any other ideas to try for doing this with existing features? Or if not then what do people think of the proposed
*-minzoom
style spec addition?Beta Was this translation helpful? Give feedback.
All reactions