Replies: 3 comments 5 replies
-
You can take a look at the following PR: The problem with solving this is the performance penalty IIRC. |
Beta Was this translation helpful? Give feedback.
-
The latest discussion is in #985. Main problem is that the approach only works with a sort-order-key which itself comes with a heavy performance penalty as implemented. |
Beta Was this translation helpful? Give feedback.
-
I encountered a similar problem, and here’s how I resolved it: I removed the icon and relied entirely on the text field. The key to creating the shield effect is to use a glyph instead of an icon and set the letter width to zero. This allows multiple glyphs to be layered in the same position. For the example above, you would need something like this:
Typically, you’ll need to use a format expression to achieve a white background and black text. However, creating more elaborate shield designs with multiple layered colors can be quite challenging. To simplify this process, I modified the source code to accept color codes directly in the "text-field." For example:
This approach allows for more flexibility and customization, however requires modification of the source data and a custom build of maplibre. (I can get into more detail if anybody is interested, but for simple shields, format expressions will work) |
Beta Was this translation helpful? Give feedback.
-
When adding a symbol layer to display icons and labels using MapLibre GL, the labels always appear above the icons within the same layer.
The expected behavior is to have icons and their corresponding labels displayed alternately in this order:
icon1, label1, icon2, label2. I want the icons and labels to overlap each other, like this.
Here is the code:
https://codesandbox.io/p/sandbox/grwjlg
Could somebody help me figure out how to achieve the desired behavior where icons and labels appear in this alternating order?
Beta Was this translation helpful? Give feedback.
All reactions