Co-authored-by: Yingfang Wang <junew@microsoft.com> Co-authored-by: Alexey Kon <48697757+random3940@users.noreply.github.com>
56 lines
1.5 KiB
JSON
56 lines
1.5 KiB
JSON
{
|
|
"version": 8,
|
|
"metadata": {
|
|
"test": {
|
|
"width": 240,
|
|
"height": 100
|
|
}
|
|
},
|
|
"sources": {
|
|
"geojson": {
|
|
"type": "geojson",
|
|
"data": {
|
|
"type": "FeatureCollection",
|
|
"features": [{
|
|
"type": "Feature",
|
|
"properties": { "x": 0},
|
|
"geometry": { "type": "Point", "coordinates": [-30, 0] }
|
|
}, {
|
|
"type": "Feature",
|
|
"properties": { "x": 5},
|
|
"geometry": { "type": "Point", "coordinates": [0, 0] }
|
|
}, {
|
|
"type": "Feature",
|
|
"properties": { "x": 10},
|
|
"geometry": { "type": "Point", "coordinates": [30, 0] }
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"sprite": "local://sprites/2x",
|
|
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
|
|
"layers": [{
|
|
"id": "bg",
|
|
"type": "background",
|
|
"paint": {
|
|
"background-color": "#ccc"
|
|
}
|
|
}, {
|
|
"id": "test",
|
|
"type": "symbol",
|
|
"source": "geojson",
|
|
"layout": {
|
|
"icon-image": "icon",
|
|
"text-field": "Label",
|
|
"text-size": 10,
|
|
"text-justify": "auto",
|
|
"text-variable-anchor-offset": ["interpolate", ["linear"], ["get", "x"], 1, ["literal", ["top", [-3, -3]]], 10, ["literal", ["top", [3, 3]]]],
|
|
"text-font": [
|
|
"Open Sans Semibold",
|
|
"Arial Unicode MS Bold"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |