Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistant label collision priority when rendering raster tiles #1450

Open
clemrouxx opened this issue Jan 19, 2025 · 2 comments
Open

Inconsistant label collision priority when rendering raster tiles #1450

clemrouxx opened this issue Jan 19, 2025 · 2 comments

Comments

@clemrouxx
Copy link

I have this custum style that I have edited in Maputnik : adventure - Copie.json (you need a MapTiler key). It includes many labels in different layers. I want to retrieve static images (for printing) of some areas. However, I noticed that the labels appear differently in raster mode (both in the viewer and when accessing tiles manually) as in vector mode (which seems to be consistant with the Maputnik viewer). Upon further inspection, in raster mode, some labels of one layer are blocked by labels of a "upper" (behind) layer; which is not supposed to happen if I understand correctly. Concretely, here is an example, where the label "COMO" is blocked in raster mode, despite it being normally in front of other nearby layers (both done at zoom 10) :

Vector case

Raster case

The problem comes from a collision detection, since the blocked labels reappear when I disable other label layers.
I have noticed this for several labels within several layers. For example, the label "Thun" from the layer "label-town" is blocked by a label from the layer "peaks".

@acalcutt
Copy link
Collaborator

acalcutt commented Jan 25, 2025

It sounds to me like this should be a maplibre-native discussion, since that is what is doing the rendering and collision detection.

Setting a tile margin takes maplibre native out of 'tile mode' and puts it into static rendering mode, which could change the label behavior a bit. usually tile mode helps label clipping, but using margin instead might change the behavior.

I thought there were also a few label options, but I can't seem to find them right now.... I will look.

@clemrouxx
Copy link
Author

Thank you, I had not realized that it was indeed a problem between adjacent tiles, and setting a tile margin worked (at least for the few examples I looked at). Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants