[Users] Help... Get WFS Feature

Matt Priour mpriour at kestrelcomputer.com
Sun Dec 5 04:47:23 CET 2010


Your feature type and feature namespace are wrong. You will also need to 
specify the geometry attribute as well.

here are the relevant parts of the WFS GetFeature response, that are not 
getting read by the response format reader:
<gml:featureMember>
      <ms:kecamatan gml:id="kecamatan.1">
....
          <ms:msGeometry> ... </ms:msGeometry>
....
</ms:kecamatan></gml:featureMember>

so your protocol should have the following properties & values

featureType:'ms:kecamatan',
featureNS:'http://mapserver.gis.umn.edu/mapserver',
geometry:'msGeometry'

This information should allow the GML feature reader spawned by the protocol 
to read your features since they use non-default values

Matt Priour
Kestrel Computer Consulting

--------------------------------------------------
From: "Saha Aswina" <sahaaswina at yahoo.com>
Sent: Saturday, December 04, 2010 1:00 PM
To: <users at geoext.org>
Subject: [Users] Help... Get WFS Feature

> Dear everybody,
>
> I am new to using GeoExt and OpenLayers. I want to get list of feature in 
> my layer, I am using example from 
> http://workshops.opengeo.org/geoext/wfs/grid.html But it doesn't work to 
> me to get from my MapServer WFS. This is my code:
>
>            var store = new GeoExt.data.FeatureStore({
>                fields: [
>                    {name: "nama_kecam", type: "string"}
>                ],
>                proxy: new GeoExt.data.ProtocolProxy({
>                    protocol: new OpenLayers.Protocol.WFS({
>                        url: 
> "/cgi-bin/mapserv?MAP=/home/dharmawa/www/map_file/fix.map",
>                        version: "1.1.0",
>                        featureType: "kecamatan",
>                        featureNS: "http://medford.opengeo.org",
>                        srsName: "EPSG:32749"
>                    })
>                }),
>                autoLoad: true
>            });
>
>            var gridPanel = new Ext.grid.GridPanel({
>                title: "Feature Table",
>                region: "center",
>                viewConfig: {forceFit: true},
>                store: store,
>                cm: new Ext.grid.ColumnModel({
>                    defaults: {
>                        sortable: true
>                    },
>                    columns: [
>                        {header: "Name", dataIndex: "nama_kecam"}
>                    ]
>                })
>            });
>
> but the grid panel is empty, whats wrong?? No error displayed in firebug.
> the page: http://www.dharmawan.web.id/map2.php
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
> 


More information about the Users mailing list