I want to display multiple polygons on the map by using rnmapbox. I tried this approach but it showed error Mapbox [error] RNMBXLayer | Layer line seems to refer to an existing layer but existing flag is not specified, this is deprecated
{polygons.map((polygon, index) => (
<MapboxGL.ShapeSource
key={index}
id="source"
shape={definePolygon(polygon)}
>
<MapboxGL.FillLayer
id="fill"
style={{
fillColor: "grey",
fillOpacity: 0.5,
}}
/>
<MapboxGL.LineLayer
id="line"
style={{ lineColor: "black", lineWidth: 2 }}
/>
</MapboxGL.ShapeSource>
))}
Can someone give me an example please because I didnt find anything useful on the internet