Fix incorrect shader selection for text labels with inline images (#4082)

This commit is contained in:
Taku Fukada
2026-02-20 05:34:43 +09:00
committed by GitHub
parent 3fc501dfdf
commit 5727f04c43
3 changed files with 60 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,59 @@
{
"version": 8,
"metadata": {
"test": {
"height": 128,
"width": 128
}
},
"center": [ 0, 0 ],
"zoom": 0,
"sources": {
"point": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [ 0, 20 ]
},
"properties": {
"iconsInText": "yes"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [ 0, -20 ]
}
}
]
}
}
},
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"sprite": "local://sprites/emerald@2x",
"layers": [
{
"id": "text",
"type": "symbol",
"source": "point",
"layout": {
"text-field": [
"case",
["==", ["get", "iconsInText"], "yes"],
["format", "IconsInText", ["image", "london-underground"]],
["format", "TextOnly"]
],
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
]
}
}
]
}