Код: Выделить всё
poly = new L.GeoJSON(polyArea[0], {
style:{
weight:2,
opacity:1,
fillOpacity:0.5,
className:"poly",
}
}).addTo(map)
Код: Выделить всё
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">
Но когда я добавил тот же стиль в :global(.leaflet-interactive), он работает. Это решает мою проблему. Но мне интересно, почему добавление стиля непосредственно в класс не работает?
Подробнее здесь: https://stackoverflow.com/questions/793 ... to-geojson