带有自定义标记和折线的 Mapbox 静态图像
Mapbox Static image with custom marker and polyline
我用这个 API 创建了一张地图:
https://docs.mapbox.com/api/maps/#static-images
我将 "path" 参数与折线以及自定义标记的 "url" 参数一起使用。
问题是路径越过标记,有解决办法吗?
谢谢
根据 API 文档 (here):
The order of features in an overlay dictates their Z-order on the page. The last item in the list will have the highest Z-order (will overlap the other features in the list), and the first item in the list will have the lowest (will underlap the other features).
因此,您可以通过在请求中将 path-
叠加层放在 url-
标记叠加层之前来纠正您看到的行为,如下所示:
https://api.mapbox.com/styles/v1/mapbox/streets-v11/static/path-{your path value},url-{your marker url}/auto/500x500?access_token={your.token}
⚠️ 免责声明:我目前在 Mapbox 工作 ⚠️
我用这个 API 创建了一张地图: https://docs.mapbox.com/api/maps/#static-images 我将 "path" 参数与折线以及自定义标记的 "url" 参数一起使用。 问题是路径越过标记,有解决办法吗? 谢谢
根据 API 文档 (here):
The order of features in an overlay dictates their Z-order on the page. The last item in the list will have the highest Z-order (will overlap the other features in the list), and the first item in the list will have the lowest (will underlap the other features).
因此,您可以通过在请求中将 path-
叠加层放在 url-
标记叠加层之前来纠正您看到的行为,如下所示:
https://api.mapbox.com/styles/v1/mapbox/streets-v11/static/path-{your path value},url-{your marker url}/auto/500x500?access_token={your.token}
⚠️ 免责声明:我目前在 Mapbox 工作 ⚠️