我在mapbox工作室上传了一个矢量源(tileset)。我正在添加这个tileset的源代码,如:
map.addSource("abc", {
type: "vector",
url: "mapbox://RELEVANT_MAP_ID"
});
然后我试图添加一个像:
的图层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
}
});
执行此代码时出现错误:
Error: Source layer "source_layer_id" does not exist on source "abc" as specified by style layer "terrain-data"
source_layer到底是为了什么?在矢量切片的情况下,如何在源上提及源图层?有没有办法在创建图块集时提及源图层?