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.

Hello this is my first post. I'm new with openlayers and geoext and i'm facing a problem while trying to add a new record in a point layer via wfs-t

the code is below (it is from http://workshops.opengeo.org/geoext/wfs/editing.html):

function reconfigure(store, url) {
            var fields = [], columns = [], geometryName, geometryType;
            // regular expression to detect the geometry column
            var geomRegex = /gml:(Point|Line|Polygon|Surface|Geometry).*/;
                var types = {
                // mapping of xml schema data types to Ext JS data types
                "xsd:int": "int",
                "xsd:short": "int",
                "xsd:long": "int",
                "xsd:string": "string",
                "xsd:dateTime": "string",
                "xsd:double": "float",
                "xsd:decimal": "float",
                // mapping of geometry types

                **//Here i want to put something for drawing in point layer**
                "Line": "Path",
                "Surface": "Polygon"
            };

I've tried to put "Poin": "Point", but it didn't work! Has anybody an idea about what i have to put there so as to work with point layer too(it already works with line and polygon layers)?? Another point of the code which may cause the problem is the save function:

{
    text: "Save",
    handler: function() {
        app.featureGrid.store.proxy.protocol.commit(
            vectorLayer.features, {
                callback: function() {
                    var layers = app.mapPanel.map.layers;
                    for (var i=layers.length-1; i>=0; --i) {
                        layers[i].redraw(true);
                    }
                    app.featureGrid.store.reload();
                }
        });

Which of the two may cause the problem? Thank's a lot!

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.