maplibre-gl-js
maplibre-gl-js copied to clipboard
Make overzoom options configurable when adding the source
User Story
As a developer, when adding a source, I want to be able to specify overzoom options so that points with transparent opacity or clusters are rendered without showing leftover features from lower zoom levels.
Rationale
We have optimized cluster rendering using Tippecanoe, but we're encountering some rendering issues.
mvt_plateform_3_13_segment.webm
In the linked video, features from lower zoom levels are still visible when they shouldn't be. For example, the "rose" circles should disappear when the yellow ones appear at higher zoom levels. This creates clutter and confusion.
We found the solution by hardcoding the following values in maplibre-gl source code:
SourceCache.maxOverzooming = 0;
SourceCache.maxUnderzooming = 0;
mvt_plateform_0_0_segment.webm
This adjustment gave us the expected cluster rendering, with the exception of some glitches in background layers, which we can avoid if this feature request will be implemented.
Additionally, a similar issue occurs with isolated points that have transparent opacity, as seen in the first video. As zoom levels increase, points from lower levels accumulate, making the color less transparent. Unfortunately, I couldn't reproduce this issue in a live example, so we're unsure if this is due to a mistake in our use of the library, a bug, or if a feature request is warranted.
PS. Thank you for your amazing library!