Add custom icons with Symbols
Add custom symbol icons to your map.
---
title: Add custom icons with Symbols
description: Add custom symbol icons to your map.
type: geojson
options:
center: [-65.017, -16.457]
zoom: 5
style:
extends: https://styles.trailsta.sh/osm-liberty.json
layers:
- type: symbol
icon-image:
- concat
- https://picsum.photos/
- [get, iconSize]
- /
- [get, iconSize]
---
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"message": "Foo",
"iconSize": 60
},
"geometry": {
"type": "Point",
"coordinates": [
-66.324462890625,
-16.024695711685304
]
}
},
{
"type": "Feature",
"properties": {
"message": "Bar",
"iconSize": 50
},
"geometry": {
"type": "Point",
"coordinates": [
-61.2158203125,
-15.97189158092897
]
}
},
{
"type": "Feature",
"properties": {
"message": "Baz",
"iconSize": 40
},
"geometry": {
"type": "Point",
"coordinates": [
-63.29223632812499,
-18.28151823530889
]
}
}
]
}