Waht about getFeatures().getChildNodes().items(n).setStyleSelector?
How to re-color polygon in KML file when styles use same id
-
01-07-2022 - |
Frage
I am trying to re-color polygons from a KML. I fetch it from a server, then use:
getFeatures().getChildNodes().items(n).getComputedStyle()
to manipulate the style, which works fine if there is no styleUrl element.
Some of the KMLs I want to load use the same styleUrl for all the polygons in the file, so changing one changes them all.
How can I add a unique styleUrl to each polygon, or better yet, change the style of an individual polygon?
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow