<html><body>OL Users,<br><br>Could some one please help?<br><br>I can not extract attributes in a KML file. Here is my KML:<br><br><?xml version="1.0" encoding="utf-8" ?><br><kml xmlns="http://www.opengis.net/kml/2.2"><br>   <Document><br>      <Folder><br>         <name>ba_uf</name><br>         <Schema name="ba_uf" id="ba_ufID"><br>            <SimpleField type="string" name="ID"></SimpleField><br>            <SimpleField type="string" name="Regiao"></SimpleField><br>            <SimpleField type="string" name="State"></SimpleField><br>            <SimpleField type="float" name="Area"></SimpleField><br>         </Schema><br>         <Placemark><br>            <Style><br>               <LineStyle><color>ff0000ff</color></LineStyle><br>               <PolyStyle><fill>0</fill></PolyStyle><br>            </Style><br>            <ExtendedData><br>               <SchemaData schemaUrl="#ba_ufID"><br>                  <SimpleData name="ID">2909901</SimpleData><br>                  <SimpleData name="Regiao">Nordeste></SimpleData><br>                  <SimpleData name="State">BAHIA></SimpleData><br>                  <SimpleData name="Area">0</SimpleData><br>               </SchemaData><br>            </ExtendedData><br>        <Polygon><br>            <tessellate>1</tessellate><br>            <outerBoundaryIs><br>                <LinearRing><br>                    <coordinates><br>   
                     -39.76265494838268,-12.27246488227016,0 
-39.48325151827876,-12.09283133762983,0 
-39.41905766787695,-11.8699639552835,0 
-39.36482198574752,-11.65858652001503,0 
-39.76422342556302,-11.64471479218556,0 
-40.04350054605078,-11.82438907570092,0 
-40.01005372231482,-12.1350573465942,0 
-39.76265494838268,-12.27246488227016,0 <br>                    </coordinates><br>                </LinearRing><br>            </outerBoundaryIs><br>        </Polygon><br>        </Placemark><br>      </Folder><br>   </Document><br></kml><br><br>This what I am using to extract and style the attributes:<br><br>...<br>        new OpenLayers.Layer.Vector("ESTADO DA BAHIA", {<br>            strategies: [new OpenLayers.Strategy.Fixed()],<br>            protocol: new OpenLayers.Protocol.HTTP({<br>                url: "kml/ba_uf_900913a.kml",<br>                format: new OpenLayers.Format.KML({<br>                   extractStyles: false, <br>                   extractAttributes: true,<br>                   srsName: "EPSG:900913"<br>                })<br>            }),<br>                style: {<br>                  fillColor: "#ffffff",<br>                  fillOpacity: 0,<br>                  strokeWidth: 1, <br>                  strokeColor: "#0000ff", <br>                  strokeOpacity: 1,<br>                  label: "${State}",<br>                  fontColor: "#ffffff",<br>                  fontFamily: "sans-serif",<br>                  fontSize: "15px",<br>                  fontWeight: "bold"<br>                }<br>...<br><br>I want the attribute for State to be rendered on the map, but I only get ${State} rendered.<br><br>I've
 tried additng <value></value> and label: "${State}" or 
label: "${State.value}" . I get either ${State} or ${State.value} 
rendered on the map, but never the actual attribute, which is BAHIA.<br><br>I just can´t get it to work. Could someone help please?<br><br>Thanks a lot in advance.<br><br>Reinaldo<br><br><br>
<hr>
<br>
Reinaldo Escada Chohfi<br>
Sócio Gerente<br>
GeoDesign Internacional<br>
<a href="http://www.geodesign.com.br">www.geodesign.com.br</a><br>
Tel./Fax: (12) 3153-5115<br>
 <br>
Inteligência e Tecnologia Espacial de Ponta<br>
 <br></body></html>