Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to export vector features (current view) as a grid, something like: http://workshops.opengeo.org/geoext/wfs/grid.html

so far layer features are not being retrieved.. I got empty grid in the window. would anyone take a look and let me know if I miss something ?

gridPanel = new Ext.grid.GridPanel({ 
        title: "Feature Grid", 
        store: new GeoExt.data.FeatureStore({ 
        fields: [ 
            {name: "id", type: "int"}, 
            {name: "name", type: "string"} 
        ], 
            proxy: new GeoExt.data.proxy.Protocol({ 
            protocol: new OpenLayers.Protocol.WFS({ 
                url: "http://IP/geoserver/wfs", 
                featureType: "myLayer", 
                featureNS: "http://mapmap.org", 
                srsName: "EPSG:3857", 
                version: "1.1.0" 
            }) 
        }), 
                autoLoad: true 
                }), 
                sm: new GeoExt.selection.FeatureModel(), 
        width: 320, 
    columns: [ 
        {header: "id", dataIndex: "id"}, 
        {header: "name", dataIndex: "name"} 
    ] 
    }); 

        //window to display grid 
        var gridWindow = new Ext.Window({ 
              items: [ 
                     gridPanel 
                       ] 
            }).show();
share|improve this question
add comment

1 Answer 1

Do you receive answer from geoserver? You should see something in firebug. I am almost sure that you have wrong value in featureNS. Check this: How to add GeoServer wfs layer on OpenLayers?

share|improve this answer
    
I used that exact protocol to add wfs layer to my map so I am sure it's right. but now I need to export features from same wfs layer to grid but got nothing ! –  Shadin Sep 20 '12 at 10:52
    
Maybe for displaying it is OK, but I am no sure if mapmap.org describes your data for GeoExt.data.FeatureStore. Do it, as it is decribed in link given. Set the namespace in geoserver and then change featureNS in your code. –  Odoakr Sep 20 '12 at 13:39
    
I sat my namespace URL in geoserver to mapmap.org so it supposes to work here right ? what's the point of setting it to another URL ? –  Shadin Sep 21 '12 at 8:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.