I'm trying to style, e.g. museums, so that both their icon and their name shows up. However, there seems to be some conflict. Here's my - related - code:
.points {
::tourism {
[tourism = 'museum'][zoom >= 17] {
marker-placement: interior; marker-fill: @icon_fill;
marker-file: url('icons/museum.svg');
marker-clip: false;
}
}
}
#area_label[zoom>=10] {
[type = 'museum'][zoom >= 17] {
text-name: "[name]";
text-fill: #111;
text-size: 8;
text-wrap-width: 30;
text-line-spacing: -1.5;
text-face-name: @sans;
text-placement: interior;
}
}
Now, the thing is:
- If I leave only the icon, it looks fine
- If I leave only the label, it still looks fine
- If I leave both, most likely only the label shows (though at times, it's only the icon that shows)
- If I add
marker-allow-overlap
, it becomes a mess
I'm looking at the "official" OpenStreetMap theme, and it seems to be handling it great: At lower zoom levels, the label may not show up, but if you zoom enough (my case), both show. (To be precise, the icon is on top, and below you can find the label).
How do they achieve that? Any hints?