I use this expression to set the line-color of a layer.
map.addLayer({
...
'paint': {
'line-color': ['get', 'color'],
},
...
})
But what if the color attribute is not defined ? Is there a way to set a fallback value ? Thanks.
question from:https://stackoverflow.com/questions/65942913/mapbox-api-how-can-i-set-a-fallback-for-the-get-expression