Is there a way to read the attributes from KML file? Id like to be able to read and assign the color anf fill to polygons created from the KML file, like one below. I can create polygon from it and can assign my colors and fill, but do not know how to assign the ones specified in the file.
Thanks,
Jakub
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<name>USSC Parcel Boundaries.kmz</name>
<Style id="PolyStyle102">
<LabelStyle>
<color>00000000</color>
<scale>0</scale>
</LabelStyle>
<LineStyle>
<color>ff0000ff</color>
<width>0.8</width>
</LineStyle>
<PolyStyle>
<color>fffac2be</color>
<fill>0</fill>
</PolyStyle>
</Style>
<StyleMap id="PolyStyle101">
<Pair>
<key>normal</key>
<styleUrl>#PolyStyle10</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#PolyStyle102</styleUrl>
</Pair>
</StyleMap>
<Style id="PolyStyle10">
<LabelStyle>
<color>00000000</color>
<scale>0</scale>
</LabelStyle>
<LineStyle>
<color>ff0000ff</color>
<width>0.8</width>
</LineStyle>
<PolyStyle>
<color>fffac2be</color>
<fill>0</fill>
</PolyStyle>
</Style>
<Placemark>
<name>SC100-095</name>
<snippet></snippet>
<Snippet maxLines="0"></Snippet>
<styleUrl>#PolyStyle101</styleUrl>
<MultiGeometry>
<Polygon>
<tessellate>1</tessellate>
<outerBoundaryIs>
<LinearRing>
<coordinates>
-80.808808,26.638871,0 -80.811331,26.638851,0 -80.814387,26.638842,0 -80.819504,26.63883,0 -80.821066,26.638841,0 -80.82130600000001,26.638846,0 -80.821305,26.653005,0 -80.80519,26.653076,0 -80.789027,26.653086,0 -80.788995,26.653086,0 -80.77284899999999,26.653129,0 -80.756653,26.65318,0 -80.756677,26.638939,0 -80.756772,26.638938,0 -80.757598,26.63898800000001,0 -80.76121999999999,26.63901,0 -80.764444,26.638992,0 -80.768063,26.638973,0 -80.77193699999999,26.63897,0 -80.772874,26.638965,0 -80.774337,26.638956,0 -80.777475,26.638933,0 -80.78221000000001,26.638942,0 -80.785484,26.638908,0 -80.786333,26.638916,0 -80.789023,26.638925,0 -80.79051699999999,26.63893,0 -80.794618,26.638895,0 -80.797904,26.638896,0 -80.802537,26.638872,0 -80.805196,26.638872,0 -80.805848,26.638872,0 -80.808808,26.638871,0 </coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</MultiGeometry>
</Placemark>
</Document>
</kml>