Answer the question
In order to leave comments, you need to log in
How to make a direction arrow on a leafet map?
Hello uv. community. Can you please tell me how to make a direction arrow on the leafet map? For example, like in google maps
Answer the question
In order to leave comments, you need to log in
You can use this plugin https://www.npmjs.com/package/leaflet-canvas-markers
It allows you to add pictures to the Leaflet Canvas layer and skew them in the direction of travel. To do this, you just need to specify the coordinates of the previous point!
Or you can manually set the rotate property.
Calculate the azimuth of the line where the marker and css rotate the marker as it should
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question