Code: Select all
poly = new L.GeoJSON(polyArea[0], {
style:{
weight:2,
opacity:1,
fillOpacity:0.5,
className:"poly",
}
}).addTo(map)
Code: Select all
stroke="grey"
stroke-opacity="1"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
fill="grey"
fill-opacity="0.5"
fill-rule="evenodd" d="M332 ...(the whole path) 332z">
Aber wenn ich den gleichen Stil zu :global(.leaflet-interactive) hinzugefügt habe, funktioniert es. Es löst mein Problem. Aber ich frage mich, warum das direkte Hinzufügen des Stils zur Klasse nicht funktioniert?