protomaps / basemaps

Basemap PMTiles generation and cartographic styles for OpenStreetMap data and more
https://maps.protomaps.com/
Other
378 stars 49 forks source link

bus_stop zoom off by 1 [#163] #176

Closed bdon closed 1 year ago

bdon commented 1 year ago

@nvkelso @eikes

We should document how this works at https://docs.protomaps.com/basemaps/layers

notably, we need to be consistent about the mismatch between 256px NE/Leaflet zooms and MapLibre zooms. when we want bus stops to display at Z18 (MapLibre) we encode min_zoom = 17 in the tiles?

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

50.0% 50.0% Coverage
0.0% 0.0% Duplication

nvkelso commented 1 year ago

Yes, we could straighten this out.

In the POIs layer we're setting the kind min_zooms to the 512px values (so -1 from what is in Tilezen, to then increase them on export)... also so setting the zoomRange is more straight forward.

.setAttr("pmap:min_zoom", minZoom + 1) ...snip... .setZoomRange(Math.min(minZoom, 15), 15)

I think the other layers also follow this pattern?