Hi there,

I would like to read some of the KML attributes and display them in the 
GridPanel.

It works partly with 

                var store = new GeoExt.data.FeatureStore({
                        .....
                        {name: 'name', type: 'string'},
                        {name: 'Avg_GRIDCO', type: 'string'}
                    ],
                    autoLoad: true
                });



and


            // create grid panel configured with feature store
            gridPanel = new Ext.grid.GridPanel({
                title: "Feature Grid",
                region: "east",
                store: store,
                width: 720,
                columns: [{
                    header: "Name",
                    width: 200,
                    dataIndex: "name"
                }, {
                    header: "Value",
                    width: 500,
                    dataIndex: "Avg_GRIDCO"
                }],
                sm: new GeoExt.grid.FeatureSelectionModel() 
            });


But as soon as I want to add more attributes, the KML changes (I use a ArcGIS 
export script). I would like to add a third column to the GridPanel which would 
display for example the "query" field as displayed in the KML. But as it now 
regroups the attributes in "<ExtendedData><SchemaData><SimpleData>...." I don't 
know how to access these values.


       <Placemark>
         <name><![CDATA[ChĂȘne-Bourg]]></name>
         <Snippet 
maxLines="1"><![CDATA[$[ge_bat_surface/Avg_GRIDCO]]]></Snippet>
         <styleUrl>#98.88590604</styleUrl>
         <ExtendedData>
           <SchemaData schemaUrl="#ge_bat_surface_schema">
             <SimpleData name="Avg_GRIDCO">91.23809524</SimpleData>
             <SimpleData name="query"><![CDATA[<img 
src='http://localhost/geodataportal/htdocs/webapp/graph.php?data=110,177,113,116,136,139,123,117,132,123,176,91,166,145,181,300,125,146,130,117,167,157,139,170,166,154,129,135,98,147,92,131,192,151,108,174,160,131,121,134,
 [Avg_GRIDCO]' alt='' />]]></SimpleData>
           </SchemaData>
         </ExtendedData>
         <Polygon>
           <extrude>0</extrude>
           <altitudeMode>clampedToGround</altitudeMode>
           <outerBoundaryIs>
           <LinearRing>
             <coordinates>
               6.19916325334619,46.1919381554992,0
               6.20581450703681,46.2003070062326,0
               6.204431057847,46.2104503856151,0
               6.20191110288101,46.2084162843599,0
               6.2022727728702,46.2044792135235,0
               6.19509309688971,46.2010891120877,0
               6.18744843816042,46.1914758963574,0
               6.19916325334619,46.1919381554992,0
             </coordinates>
           </LinearRing>
           </outerBoundaryIs>
         </Polygon>
       </Placemark>
       <Placemark>

Thanks a lot for any tips!

Stefan
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to