Re: [OpenLayers-Dev] DeleteFeature control

2009-07-23 Thread Eric Lemoine
On Wed, Jul 22, 2009 at 7:22 PM, Alexandre Dubead...@mapgears.com wrote: Eric Lemoine wrote: Alexandre I now understand one of your problems, you need to give the handler a reference to the control, but the control does not exist yet since you're actually creating it. Giving the handler a

Re: [OpenLayers-Dev] DeleteFeature control

2009-07-23 Thread Alexandre Dube
Hi, Eric Lemoine wrote: I still agree with automatic controls and handlers activation/deactivation. Attached an new patch with the simple changes needed. Is it ok ? If it is, I'll open a ticket. Ok to me. Thanks Alexandre, http://trac.openlayers.org/ticket/2196 currently

Re: [OpenLayers-Dev] DeleteFeature control

2009-07-22 Thread Alexandre Dube
Hi, I'm going to work on my example today. See below. Eric Lemoine wrote: why not using the regular var i, len, control; for(i = 0, len = controls.length; i len; i++) { control = controls[i]; } ? Right. I just wondered if it could have been possible to have a {} instead of

Re: [OpenLayers-Dev] DeleteFeature control

2009-07-22 Thread Alexandre Dube
Eric Lemoine wrote: Alexandre I now understand one of your problems, you need to give the handler a reference to the control, but the control does not exist yet since you're actually creating it. Giving the handler a fake control, of the form {map: map} (where map is the map instance) should do

Re: [OpenLayers-Dev] DeleteFeature control

2009-07-21 Thread Alexandre Dube
Hi, I'm trying to reproduce what we discuss. I'm not really familiar with this method and I'm having difficulties with 'this'. Here's what I have so far : /*** START ***/ var delCtrl = new OpenLayers.Control({ layer: olWFSRoads, handlers: {keyboard: new

Re: [OpenLayers-Dev] DeleteFeature control

2009-07-21 Thread Alexandre Dube
Oh and by the way, here's what I did for the Control (attached). Is it ok (too much, i.e. about the use of hasOwnProperty functions) ? Thanks, Alexandre Alexandre Dube wrote: Eric Lemoine wrote: so, to get to the delete control you've been working on, I see more value, in terms of

[OpenLayers-Dev] DeleteFeature control

2009-07-21 Thread Eric Lemoine
On Tuesday, July 21, 2009, Alexandre Dube ad...@mapgears.com wrote: Oh and by the way, here's what I did for the Control (attached).  Is it ok (too much, i.e. about the use of hasOwnProperty functions) ? why not using the regular var i, len, control; for(i = 0, len = controls.length; i len;

Re: [OpenLayers-Dev] DeleteFeature control

2009-07-21 Thread Eric Lemoine
Alexandre I now understand one of your problems, you need to give the handler a reference to the control, but the control does not exist yet since you're actually creating it. Giving the handler a fake control, of the form {map: map} (where map is the map instance) should do the trick. I think

Re: [OpenLayers-Dev] DeleteFeature control

2009-07-20 Thread Alexandre Dube
Hi Eric, Eric Lemoine wrote: (I never used Protocol.MapFish and Strategy.Save together, I'm curious to know why they don't play together) I haven't tried either, but in the past I tried the HTTP protocol + featureserver and the Save strategy wasn't able to read the insertedId of the

Re: [OpenLayers-Dev] DeleteFeature control

2009-07-20 Thread Eric Lemoine
On Monday, July 20, 2009, Eric Lemoine eric.lemo...@camptocamp.com wrote: On Monday, July 20, 2009, Alexandre Dube ad...@mapgears.com wrote: Hi Eric, Eric Lemoine wrote:   (I never used Protocol.MapFish and Strategy.Save together, I'm curious to know why they don't play together) I

Re: [OpenLayers-Dev] DeleteFeature control

2009-07-20 Thread Alexandre Dube
Eric Lemoine wrote: so, to get to the delete control you've been working on, I see more value, in terms of flexibility, in adding control composition to the control base class. I also agree. Originally, the control had a Feature handler instead of a SelectFeature control. Looking at

[OpenLayers-Dev] DeleteFeature control

2009-07-19 Thread Eric Lemoine
On Friday, July 17, 2009, Alexandre Dube ad...@mapgears.com wrote: Hey, Hi Alexandre   I'd like to ask a couple of questions about this control.   Currently, the only thing it really does is change the state of the selected features to DELETE and on 'del' keypress, it triggers a

Re: [OpenLayers-Dev] DeleteFeature control

2009-07-17 Thread Alexandre Dube
Hey, I'd like to ask a couple of questions about this control. Currently, the only thing it really does is change the state of the selected features to DELETE and on 'del' keypress, it triggers a 'deletefeatures' event, but it doesn't actually delete (commit, destroy, remove, etc.)

[OpenLayers-Dev] DeleteFeature control

2009-07-16 Thread Alexandre Dube
Hi, I just sent (finally) a new patch for ticket 1882 (1) (DeleteFeature control) and set the status to review. (1) http://trac.openlayers.org/ticket/1882 Regards, -- Alexandre Dubé Mapgears www.mapgears.com ___ Dev mailing list

Re: [OpenLayers-Dev] DeleteFeature Control

2009-03-03 Thread Alexandre Dube
Hi Devs, http://trac.openlayers.org/ticket/1882 The way I see this control now the more I think it should have been done an other way. Currently : - It uses feature+keyboard+box handlers for selection/unselection - It has its own array of selected features - It directly changes the

Re: [OpenLayers-Dev] DeleteFeature Control

2009-03-03 Thread Christopher Schmidt
On Tue, Mar 03, 2009 at 08:44:55AM -0500, Alexandre Dube wrote: Hi Devs, http://trac.openlayers.org/ticket/1882 Alexandre, Given this, it seems like the current code needs more work. For now, I've set the ticket to that, and moved it to 2.9, since it seems like we need discussion, more than

Re: [OpenLayers-Dev] DeleteFeature Control

2009-01-17 Thread Ivan Grcic
Ive just played with it a bit, very handy control, it will be very usefull! thank you Alex! On Thu, Jan 15, 2009 at 3:53 PM, Alexandre Dube ad...@mapgears.com wrote: Alexandre Dube wrote: Thanks Roald for the review. I just added some more user-friendly features to the control and

Re: [OpenLayers-Dev] DeleteFeature Control

2009-01-07 Thread Roald de Wit
Hi Alex, On Thu, 2009-01-08 at 02:08 +1030, Alexandre Dube wrote: Eric Lemoine suggested some modifications I just completed. Do you find this feature interesting ? Sure, it seems quite intuitive to me to be able to select multiple features and using the DELETE key for deletion! Thanks for