Question

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?

Was it helpful?

Solution

Waht about getFeatures().getChildNodes().items(n).setStyleSelector?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top