[Featureserver] Delete feature

Walter Lorenzetti lorenzetti at faunalia.it
Wed Jun 11 12:21:47 EDT 2008


Brian Hamlin ha scritto:
> Can you say that again, in a different way?
> Its not clear what you mean
>
>
>
thank you for replay... yes I think so me that is not clear :)

On featureserver documentation I found that for delete a feature from my
data I have to use curl software, like:

|curl -X DELETE http://example.com/featureserver.cgi/layer/1.json

but for me is necessary delete the feature by url, but I think I found
the solution
this is correct?

building  a del() function like this:

geojson = new OpenLayers.Format.GeoJSON();

function del(feature) {
        url = "/featureserver.cgi/layer";
           
            json = geojson.write(feature);
            new OpenLayers.Ajax.Request(url,
                     {   method: 'DELETE',
                         postBody: json,
                         requestHeaders: ['Accept', 'application/json'],
                         onSuccess: success,
                         onFailure: function(xhr) {
                           $('info').innerHTML = "Failed upload (status
code "+xhr.status+"). Check your URL."
                         }
                      }
                     );
|

W

-- 
Please no  .doc, .xls, .ppt, .dwg:
https://www.faunalia.it/dokuwiki/doku.php?id=public:OpenFormats

Walter Lorenzetti
email+jabber: lorenzetti at faunalia.it
www.faunalia.it
Cell: (+39) 347-6597931  Tel+Fax: (+39) 0587-213742
Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/featureserver/attachments/20080611/8dd9ae5a/attachment.html


More information about the Featureserver mailing list