Mapbox gl js - draw a car marker

匆匆过客 提交于 2019-12-31 05:11:08

问题


I need to draw a car marker based on it's position. But, unlike all official examples, like this, I want size of my marker to be dependent on zoom level. And, I want it to have heading as well - I need to rotate it based on the car's heading. Is it possible with Mapbox GL JS, and how to do it?


回答1:


The Symbol layer https://www.mapbox.com/mapbox-gl-js/style-spec#layers-symbol is best suited for this, see this example https://www.mapbox.com/mapbox-gl-js/example/rotating-controllable-marker/



来源:https://stackoverflow.com/questions/49925979/mapbox-gl-js-draw-a-car-marker

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