[Featureserver] Delete feature
Eric Lemoine
eric.c2c at gmail.com
Wed Jun 11 12:27:43 EDT 2008
Every http client does use urls, curl included. What you meant is
delete features from the browser, and you got it it seems. Cheers,
Eric
2008/6/11, Walter Lorenzetti <lorenzetti at faunalia.it>:
> 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
>
>
More information about the Featureserver
mailing list