Hi,

I'm importing a kml text file a a layer in my map:

var Layer_Regionen = new OpenLayers.Layer.GML("KML",
"geodaten/regionen.kml", {
           projection: new OpenLayers.Projection("EPSG:4326"),
           format: OpenLayers.Format.KML,
       formatOptions: {
                    extractStyles: true,
                    extractAttributes: true
                }
        });

Later in the code I'd like to extract some of the attribute out of a feature
the Layer 'Layer_Regionen'. But i only get a whole string like this:

"<center><table><tr><th colspan='2'
align='center'><em>Attributes</em></th></tr><tr
bgcolor='#E3E3F3'><th>SHAPE_Area</th><td>8.80217136597592</td></tr><tr
bgcolor=''><th>region</th><td>14</td></tr><tr
bgcolor='#E3E3F3'><th>SHAPE_Length</th><td>15.2328377860413</td></tr><tr
bgcolor=''><th>OBJECTID</th><td>2</td></tr></table></center>"

I only need the attribut 'region' with the value '14'.

Could someone help me?
-- 
View this message in context: 
http://n2.nabble.com/KML-and-Attributs-tp2811856p2811856.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

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

Reply via email to