1

I am using leaflet 1.7.1 and I need to put custom markers on map.

I am currently using circles (as in: L.circle([lat, lon], {radius: rad}).addTo(map);) as my markers (note radius is significant and should be in meters).

Now I need to add a "direction" to this circle essentially displaying something like:

enter image description here

I actually need to implement some L.directedCircle([lat, lon], {radius: rad, heading=45}).addTo(map);, but I don't know how to do that.

I also tried looking for plugins, but nothing seems to do what I need.

Note that the image above is just an example, I'm open to other options but that seems very simple (it's just a 4-points SVG poliline) and effective.

If that matters I'm using leaflet through pyqtlet2, but I'm prepared to "get my hands dirty" using directly javascript.

Any help appreciated.

ZioByte
  • 2,690
  • 1
  • 32
  • 68
  • Have you seen [Leaflet.ArrowCircle](https://github.com/coyotesqrl/Leaflet.ArrowCircle/blob/master/src/L.ArrowCircle.js) [Demo](https://coyotesqrl.github.io/Leaflet.ArrowCircle/)? – Falke Design Oct 30 '21 at 17:55
  • @FalkeDesign: yes I had seen it, but it seems it wants to draw really big circles (size is Km) while I need very small ones (a few meters). I am trying to replicate that plugin behavior (and failing, to date) using L.GeometryUtil.destination() + L.polygon() – ZioByte Oct 30 '21 at 18:15

0 Answers0