Dash Leaflet: How to rotate a marker?

Are you using marinetraffic.com? Attempted a few injections of getting rotation on icons but didn’t have much luck.

If all else fails, my suggestion would be to create a folder named ship_degrees in the assets folder. Then I would create as many icons as you need, basically go into photoshop, turn the icon 15degrees then save to that folder as ship_icon_15degree.png or something… then when you a return ship that falls within a specific rotation range you just load that image as the icon.

Not an ideal solution… but it would work.

2 Likes