Dash Leaflet: how to draw dotted line?

I’m trying to draw lines on a map and, under certain circumstances, make them dotted or dashed or somehow visually indicate a uniqueness.

I’ve experimented with the dashArray property of Polyline, but that doesn’t work the way I expect.

Can someone please point me in the right direction?

Thanks!

1 Like

This is already included in leaflet,
https://www.dash-leaflet.com/components/vector_layers/polyline_decorator

I’ve recently been playin within the repo and was able to make a few improvements you might be interested in like the Ant Path which is animated lines and a few other things which is explained in this post:

You can download this forked leaflet via my website:

after download put the .tar.gz file in your project and pip install it directly and you’ll have access to the animation line, the edit controls color change and the edit control emojimart. Look at my test files for reference on how these are setup:

the files of interest are the edit_control.py and the ant_path.py