protomaps / basemaps

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

Circles without correspnding label appearing #167

Closed daniel-j-h closed 6 months ago

daniel-j-h commented 1 year ago

When zooming into the map on some zoom layers it looks like circle appear without corresponding labels.

Have a look at the screenshots below; in the second one I'm highlighting the issue in red (zoom in).

I believe this is the case because we have

I think this is how we could fix it

  1. We don't do anything and don't care that circles without labels are appearing
  2. Instead of a circle layer and a symbol layer for text only, we could have a single symbol layer and use text+icon in a single layer
  3. We add variable anchors so that the labels still show up when the left/center anchor doesn't work out

https://maplibre.org/maplibre-style-spec/layers/#layout-symbol-text-variable-anchor

Note: the screenshots are from the latest map on https://maps.protomaps.com

basemap0 basemap1 basemap2

nvkelso commented 1 year ago

Great feedback, thank you! I agree the text and icon symbols should be consolidated into single draw style layer.

We’re working on that now with the active icon sprint and new basemap styles @bdon can talk more about, in collaboration with @sensescape.

bdon commented 1 year ago

This is related to #160 because to make text + circle into a unified layer we need to use the Symbol layer type.

I just created https://github.com/protomaps/basemaps-assets with placeholder assets - I think using GitHub pages with no build step is the most obvious and transparent place to put sprites/fonts for the basemap. will begin to flesh this out and gather some feedback before we commit to using those URLs

bdon commented 6 months ago

This is resolved with the addition of spritesheets in styles v3.0.0

Screenshot 2024-05-10 at 16 18 30