Re: [OpenLayers-Dev] multipleSelectFeature on one layer

2009-01-26 Thread Alexandre Dube
Hi Eric, You're right. So instead of removing the last renderIntent from the stack, we need to remove the last renderIntent of the current SelectFeature. SFC = SelectFeature Control RIA = renderIntents array Let's say the mouse goes hover a feature and get selected by a 1st SFC :

Re: [OpenLayers-Dev] multipleSelectFeature on one layer

2009-01-26 Thread Alexandre Dube
Hi devs, My only problem remaining : should the layer keep its selectedFeature array ? If so, on selection, it's easy to know if a feature is already selected. As soon as one control adds it to its own array, it checks in the layer's one and add it if it's not there. But for

Re: [OpenLayers-Dev] multipleSelectFeature on one layer

2009-01-26 Thread Amos Hayes
I think the big questions for me are: Where are you planning to store the states? How will an app developer obtain a list of currently selected features and distinguish between the 'selections' that have been applied if more than one control has been set up? -- Amos Hayes Geomatics and

Re: [OpenLayers-Dev] multipleSelectFeature on one layer

2009-01-26 Thread Alexandre Dube
Amos Hayes wrote: I think the big questions for me are: Where are you planning to store the states? Do you mean feature.state ? I don't understand what you mean. How will an app developer obtain a list of currently selected features and distinguish between the 'selections' that have

Re: [OpenLayers-Dev] multipleSelectFeature on one layer

2009-01-26 Thread Eric Lemoine
Hi If I understand you correctly, on unselect you always redraw the feature after removing the intent from the intents array, right? Does your logic work with two controls, two of which having the same render intent. If the intents array is [a, b, a], I fear that an not the proper intent will be

Re: [OpenLayers-Dev] multipleSelectFeature on one layer

2009-01-26 Thread Alexandre Dube
Hey, Eric Lemoine wrote: Hi If I understand you correctly, on unselect you always redraw the feature after removing the intent from the intents array, right? Yes Does your logic work with two controls, two of which having the same render intent. If the intents array is [a, b, a], I

Re: [OpenLayers-Dev] multipleSelectFeature on one layer

2009-01-26 Thread Alexandre Dube
Alexandre Dube wrote: Hi, Here's an other possibility : SFA : selectedFeature Array RI : renderIntent RIA : renderIntent Array Let's say we forget about the controls to have their own SFA. Only the layer has its own SFA. on featureselect if feature is not in SFA

Re: [OpenLayers-Dev] multipleSelectFeature on one layer

2009-01-25 Thread Eric Lemoine
Hi Alex Consider this sequence: mouse goes over feature, feature is clicked (for selection), and clicked again (for unselection). With your stack of intents logic, the feature isn't redrawn as a result of the second click; instead it should be redrawn with the hover control's render intent,

[OpenLayers-Dev] multipleSelectFeature on one layer

2009-01-23 Thread Alexandre Dube
Hi devs, I would like to propose some changes about the SelectFeature control. First, I'll introduce what I want to do : I want to change the color of a feature while the mouse is over it without selecting it. I managed to do this by building a customized control similar to the

Re: [OpenLayers-Dev] multipleSelectFeature on one layer

2009-01-23 Thread Alexandre Dube
Hi devs, Eric was right : A first note. The current select feature implementation should accomodate this use case: two controls on the same layer, one working on click and the other on hover, only one of them actually changing the feature style. This is achievable by registering a

Re: [OpenLayers-Dev] multipleSelectFeature on one layer

2009-01-23 Thread Amos Hayes
Hi Alexandre. I like the idea of a stack of styles. If we use select (clicked) and hover (moused over) as distinct terms, then the 4 styles to worry about are: 1. Not selected and not hovering (normal) 2. Not selected but hovering (user is exploring with the mouse) 3. Selected and hovering

Re: [OpenLayers-Dev] multipleSelectFeature on one layer

2009-01-23 Thread Julien-Samuel Lacroix
Hi, I would also add that this idea has the benefit to support multiple SelectFeature at the same time, not just those 4 states. Multiple SelectFeature Control could play together. Julien Amos Hayes wrote: Sorry, that should have read 'the 4 states to worry about'. Also, I can envision a