ipyleaflet
ipyleaflet copied to clipboard
Point_style is lost after hover_style is applied
In the example below the original point_style will never show again after the hover_style has been applied once. Is this a known Leaflet limitation, maybe?
import geojson
from ipyleaflet import Map, GeoJSON
m = Map(center=[0, 0], zoom=4)
data = geojson.Feature(
geometry=geojson.MultiPoint(
coordinates=[(i, 0) for i in range(-20, 20, 5)]
)
)
point_style = {"color": "red"}
hover_style = {"color": "blue"}
m += GeoJSON(data=data, point_style=point_style, hover_style=hover_style)
m.layout.height = "200px"
m
