-
Hi every one, After reading the doc: https://maplibre.org/maplibre-style-spec/layers/#icon-overlap
But when I try in my own playground, I don't find this behavior. example : https://jsbin.com/qurafam/edit?html,js,output
documentation reference : #347 Do you have any feedback on this? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
This looks like a bug in the implementation from a very shallow look. |
Beta Was this translation helpful? Give feedback.
-
It's been a long time since I looked at this, but aren't layers placed
front to back, so last layer in the JSON gets placed first?
…On Sun, Jun 15, 2025, 1:15 PM Harel M ***@***.***> wrote:
This looks like a bug in the implementation from a very shallow look.
Looking at the linked PR it seems that this "simple" case is not there as
far as I can tell.
You can check the images and the style.json in the PR and see what tests
were added to cover this change.
@drwestco <https://github.com/drwestco> do you know if the case described
here was ever tested?
—
Reply to this email directly, view it on GitHub
<#6022 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVM5WTH76ZDHPUTGYOJ5D3DXH7DAVCNFSM6AAAAAB7LB3QICVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNBXGY2DMOA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
First layer (A) in JSON is on bottom. Last layer (B) is placed first. So B
is considered first and placed. Then A is considered, is seen to overlap B
and is rejected. Or am I misremembering? There's an integration test that
uses a mix of cooperative and never modes. It may not be working properly
though. I'd expect at least one of the icons marked as never to show up.
…On Sun, Jun 15, 2025, 1:50 PM Harel M ***@***.***> wrote:
I thought that might be it, but the B icon seems to look on top of A if
both are placed, so I think the order of the layers is from top to bottom...
—
Reply to this email directly, view it on GitHub
<#6022 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVM5WCEYQTYQAV6OAJW3D3DXMBNAVCNFSM6AAAAAB7LB3QICVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNBXGY3DEMY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hi and thank you for your answers ! First layer (A in red) in JSON is defined with from what I understood
|
Beta Was this translation helpful? Give feedback.
-
Hum, thank you @drwestco for your feedback. Can you confirm, if I've understood this correctl?
that means the previous symbol is on top. my example wasn't appropriate, I should have used the
🎉🎉 |
Beta Was this translation helpful? Give feedback.
It's confusing, but placement is done front-to-back (B, then A). Rendering is then done back-to-front (A, then B). The last layer in the JSON (B, here) is in front, and thus has priority for placement.
You get the same behavior using the old
icon-allow-overlap
property. Indeed,"icon-allow-overlap": true
maps to"icon-overlap": "always"
, and"icon-allow-overlap": false
maps to"icon-overlap": never
.So I believe the example is working as expected.