[OpenLayers-Users] Ajax delete

Yves Moisan yves.moisan at boreal-is.com
Mon Dec 22 09:28:25 EST 2008


Le samedi 20 décembre 2008 à 09:10 +0100, Eric Lemoine a écrit :
> Yves
> 
> If you use OpenLayers.Protocol.HTTP, which I'd recommend you do, you
> won't need to use OpenLayers.Request yourself. 

That's what I'm doing indeed in my vector layer.  I was thinking of
using a syntax like 

new OpenLayers.Ajax.Request(url, 
                     {   method: 'post', 
                         postBody: json,
                         requestHeaders: ['Accept', 'application/json'],
                         onSuccess: whatever
                         },
                         onFailure: whatever
                      }
                 );

with method = delete.

> Although I've never
> tested Protocol.HTTP against FeatureServer I'm pretty confident it'll
> work, and if it doesn't I'll be happy to help with that.

Thanx.  I think an interesting OL sprint activity could be to go through
the examples and tag them with an appropriate version of OL or revisit
them so they adopt the best practices put forth by the current OL
version.  One thing that would be needed for the examples is a
publishing date : people would expect a 2-yr old example not to be
representative of a OL 2.7 best practices.

I'll go hunt for examples now.

Yves





More information about the Users mailing list