Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally #33:
This PR adds the option to set the maximum zoom level at which features should be clustered. Syntax taken from the updated docs:
-k
zoom or--cluster-maxzoom=
zoom: Max zoom on which to cluster points if clustering is enabled.-kg
or--cluster-maxzoom=g
: Set--cluster-maxzoom=
tomaxzoom - 1
so that all features are visible at the maximum zoom level.I just picked the letter
k
as it was available, but this could be change to anything else if needed.An alternative solution would be to use the already existing
--base-zoom
option to prevent clustering above the specified zoom. While possible, it could lead to unexpected result when using both-zg
and-Bg
, as the zoom at which most feature would be become distinct could be much higher than the one at which a tile crosses the 50k feature limit.Fixes mapbox/tippecanoe#934 and mapbox/tippecanoe#799.
This PR, alongside mapbox/tippecanoe#940 and #32 would bring feature parity and improved consistency with the supercluster library used to generate clusters in
mapbox-gl-js
.