【发布时间】:2021-03-12 21:44:11
【问题描述】:
我们一直很高兴地使用 MapBox Studio,现在我们正试图通过与 mapbox api 交互来进一步推动事情。
我正在尝试请求更新样式以隐藏/显示图层,但出现错误:
{
"message": "layers[0]: source \"composite\" not found"
}
这是我的 json 正文请求负载:
{
"version":8,
"name":"OnStreet-V2",
"layers":[
{
"id":"pay_ds-torres-vedras-livre",
"type": "fill",
"source": "composite",
"source-layer": "Estacionamento_Livre",
"layout":{
"visibility":"none"
}
}
]
}
这更奇怪,因为为了确保我有正确的源和源层信息,我从 mapbox studio 下载了我的样式的 json 定义,在那里我得到了以下信息:
{
"id": "pay_ds-torres-vedras-livre",
"type": "fill",
"source": "composite",
"source-layer": "Estacionamento_Livre",
"layout": {},
`enter code here`"paint": {"fill-color": "hsl(101, 53%, 41%)", "fill-opacity": 0.3}
}
我也做了一些研究,但找不到这个具体问题。源合成也在设置中。
我正在使用邮递员来测试 api 调用。
【问题讨论】:
标签: mapbox