from ipyleaflet import Map, WKTLayer
m = Map(center=(42.3152960829043, -71.1031627617667), zoom=17)
wlayer = WKTLayer(path="data/test.wkt", hover_style={"fillColor": "red"})
m.add(wlayer)
m
wlayer.style = {
"color": "green",
"opacity": 1,
"weight": 1.9,
"dashArray": "9",
"fillOpacity": 0.1,
}
# Add WKT layer from WKT string
m = Map(center=(-25.0927734375, 10.689697265625), zoom=4)
wlayer2 = WKTLayer(
wkt_string="POLYGON((10.689697265625 -25.0927734375, 34.595947265625 -20.1708984375, 38.814697265625 -35.6396484375, 13.502197265625 -39.1552734375, 10.689697265625 -25.0927734375))",
style={
"color": "green",
"opacity": 1,
"weight": 1.9,
"dashArray": "9",
"fillOpacity": 0.1,
},
)
m.add(wlayer2)
m