Was default_marker removed from mapbox-gl.js

不问归期 提交于 2019-12-23 02:28:24

问题


I am trying to use the default_marker and/or secondary_marker in mapbox-gl.js however it appears they have been removed from the sprite.json in streets-v9 (probably v8 too). I've found a working example in streets-v7 where they were part of the sprite.json/sprit.png, but they are gone now.

How can I get these back or what is the new replacement? I've gone through the new sprint.png but I don't see anything similar.


回答1:


Apologies for the change, ongle! We've recently worked to standardize the icons available across all the Mapbox styles which, unfortunately, required some breaking changes.

The closest replacement to default_marker is marker-15. The appearance of this marker will be different per style.

You may also choose to upload your own marker image per this guide.



来源:https://stackoverflow.com/questions/37957065/was-default-marker-removed-from-mapbox-gl-js

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!