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?

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top