I have a vector source(tileset) uploaded on mapbox studio. I am adding a source with this tileset like :
map.addSource("abc", {
type: "vector",
url: "mapbox://RELEVANT_MAP_ID"
});
then I am trying to add a layer like:
map.addLayer({
"id": "layer_id",
"type": "line",
"source": "abc",
"source-layer": "source_layer_id",
"layout": {
"line-join": "round",
"line-cap": "round"
},
"paint": {
"line-color": "#ff69b4",
"line-width": 4
}
});
When I execute this code I get an error :
Error: Source layer "source_layer_id" does not exist on source "abc" as specified by style layer "terrain-data"
What exactly the source_layer is for ? How do I mention the source layer on source in case of vector tiles ? Is there any way to mention the source layer while creating the tile set?