jupyter-widgets / ipyleaflet

A Jupyter - Leaflet.js bridge
https://ipyleaflet.readthedocs.io
MIT License
1.47k stars 359 forks source link

Set marker color/icon in DrawControl #1174

Open achimgaedke opened 5 months ago

achimgaedke commented 5 months ago

I believe once upon a time a marker had a "color" trait.

The workaround for customizing the color marker seems to be something like this:

a = AwesomeIcon(marker_color="green", name="circle")
marker = Marker(location=center, draggable=True, icon=a)
m.add(marker);

But how do I set the marker color for new markers in the DrawControl's shapeOptions?

The example notebooks examples/DrawControl.ipynb, examples/CustomProjections.ipynb suggest that is/was possible.

Any ideas?