Hello all,
Background
I am plotting vessels using dash leaflet and plotting the heading or direction the ship is pointing is very helpful and important with respect to visualising the ships. In an ideal world I would do this by rotating the marker by value set by a rotation angle parameter, but this does not exist.
A leaflet plug in that I believe to be of use, but have not used given my zero experience in JS, can be found here. A general question would also be how might we use the many leaflet plugins that are available within JS via dash leaflet?
Code:
I am iterating through a pandas dataframe and appending each row as a marker within the children propert of a layer group in dash leaflet:
tmp_children += [dl.Marker(id=f"{row['vessel_name']}",position=[row["latitude"], row["longitude"]],
#radius=radius,
#color=icon_color,
#fillColor=icon_color,
n_clicks=0,
children=[dl.Popup(children=[tanker_popup],pane='tooltipPane')])]
You’ll see I have commented out radius, color etc as I originally was plotting with CircleMarker but have retired its use as my only hope of using a rotated marker appears to lay in the custom flexibility of Marker.
Thanks in advance