diff --git a/jvm/src/test/resources/styles/multisprite/style.json b/jvm/src/test/resources/styles/multisprite/style.json index 96dfa4b14..cb6a2c7d4 100644 --- a/jvm/src/test/resources/styles/multisprite/style.json +++ b/jvm/src/test/resources/styles/multisprite/style.json @@ -7,8 +7,6 @@ "name": "test-sprites", "sources": { "test_label": { - "minzoom": 0, - "maxzoom": 0, "type": "geojson", "data": { "type": "FeatureCollection", @@ -373,4 +371,4 @@ "duration": 0, "delay": 0 } -} +} \ No newline at end of file diff --git a/jvm/src/test/resources/styles/style_geojson_ch_label.json b/jvm/src/test/resources/styles/style_geojson_ch_label.json index bf312a5d8..0fa0d761b 100644 --- a/jvm/src/test/resources/styles/style_geojson_ch_label.json +++ b/jvm/src/test/resources/styles/style_geojson_ch_label.json @@ -13,8 +13,6 @@ "sources": { "test_label": { - "minzoom": 0, - "maxzoom": 0, "type": "geojson", "data": { "type": "FeatureCollection", diff --git a/shared/src/map/layers/tiled/vector/geojson/geojsonvt/geojsonvt.hpp b/shared/src/map/layers/tiled/vector/geojson/geojsonvt/geojsonvt.hpp index e38b4aa02..0b51571e8 100644 --- a/shared/src/map/layers/tiled/vector/geojson/geojsonvt/geojsonvt.hpp +++ b/shared/src/map/layers/tiled/vector/geojson/geojsonvt/geojsonvt.hpp @@ -146,10 +146,7 @@ class GeoJSONVT: public GeoJSONVTInterface, public std::enable_shared_from_this< void initialize(const std::shared_ptr &geoJson) { // If the GeoJSON contains only points, there is no need to split it into smaller tiles, // as there are no opportunities for simplification, merging, or meaningful point reduction. - // Keep point-only sources on a single zoom level only if minZoom is explicitly configured (> 0). - // For the default minZoom=0 case, collapsing to z0 creates very large matching tolerances and can - // hide unrelated points due to symbol ownership deduplication. - if (geoJson->hasOnlyPoints && options.minZoom > 0) { + if (geoJson->hasOnlyPoints) { options.maxZoom = options.minZoom; } @@ -186,8 +183,9 @@ class GeoJSONVT: public GeoJSONVTInterface, public std::enable_shared_from_this< } void reload(const std::shared_ptr &geoJson) override { - // Keep behavior consistent with initialize(). - if (geoJson->hasOnlyPoints && options.minZoom > 0) { + // If the GeoJSON contains only points, there is no need to split it into smaller tiles, + // as there are no opportunities for simplification, merging, or meaningful point reduction. + if (geoJson->hasOnlyPoints) { options.maxZoom = options.minZoom; }