You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works well for imported shapefiles but I'm not able to find the correct syntax when I want to use my custom vector tiles in Mapbox. I've tested your example vector-layer-filled-polygons.R for one color with my custom vector tiles in Mapbox and works great but would like to extend that to have different colors for each polygon. This is my understanding of what the code would look like in Mapbox GL JS:
Hi I've been looking through the documentation and examples for filling Mapbox vector tiles.
I've noted in the example fill-layer-melbourne.R uses the "get" function to fill in the boundaries:
paint = list(
"fill-color" = c("get", "fillColor"),
"fill-opacity" = 0.7
)
This works well for imported shapefiles but I'm not able to find the correct syntax when I want to use my custom vector tiles in Mapbox. I've tested your example vector-layer-filled-polygons.R for one color with my custom vector tiles in Mapbox and works great but would like to extend that to have different colors for each polygon. This is my understanding of what the code would look like in Mapbox GL JS:
'paint': {
'fill-color': ['match', ['get', 'LHD_Name'],
'Sydney', 'red',
'South Western Sydney', 'blue',
'white']
}
What is the correct syntax for mapboxer to implement this type of visualisation?
Cheers
The text was updated successfully, but these errors were encountered: