Hi Yvo,

Since version 2.8 OL is capable of parsing ExtendedData. The following example shows how load a KML file in general:

http://openlayers.org/dev/examples/kml-layer.html

In your case, you need to set 'extractStyles' to false instead of true. That way you can control the styling yourself. You can then use the attributes from your features for styling, eg:

...
pointRadius: "${myValue.value}"
...

(note the .value after your variable name)

This is untested, so please report back if it doesn't work for you, preferably with a complete example (posted to something like pastebin).

HTH,

Roald

On 28/12/10 20:56, Yvo Weidmann wrote:
Dear List

I am using a KML file which includes some ExtendedData. A single placemark looks about that:
<Placemark>
<name>Sadaqat</name>
<ExtendedData>
<Data name="myValue">
<value>2</value>
</Data>
</ExtendedData>
<Point>
<coordinates> 69.807899,38.843349,0.000000</coordinates>
</Point>
</Placemark>

Is there a good example known, showing how to use elements / attributes of ExtendedData for styling?

Looking forward to any hint,
Yvo


_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to