I created polygons with mapbox studio and gave attributes to each. One of them, for example, is color. Now I want to display the color filled for each polygon using data-driven. But that doesn’t work. I only see the color black for everyone – what am I doing wrong?
datset bellevue:
code:
map.current!!.on("load", () => {
map.current!!.addSource("bellevue", {
type: "geojson",
data: data,
});
map.current!!.addLayer({
id: "bellevue",
type: "fill",
source: "bellevue",
paint: {
"fill-color": ["get", "color"],
},
});
The result lokks like this: