Opened 6 years ago

Last modified 6 years ago

#2781 new feature

Vector Layer feature selection events for multiple features when using box selection

Reported by: bjornharrtell Owned by: tschaub
Priority: minor Milestone: 2.13 Release
Component: Control.SelectFeature Version: 2.9
Keywords: Cc:
State: Needs Discussion


SelectFeature supports box selection that can result in multiple features selected at once but current implementation only has events for single feature selection (triggered multiple times in this case)

I've added two complementing events to Vector layer to report selection or unselection as a single event in attached patch.

My use case for this is when triggering expensive GUI updating from selection-events it was desirable only to update once for a box select.

Awaiting feedback before doing test cases.

Attachments (1)

multiselectevents.diff (4.1 KB) - added by bjornharrtell 6 years ago.
Initial implementation

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by bjornharrtell

Initial implementation

comment:1 Changed 6 years ago by bartvde

  • State changed from Review to Needs Discussion

Hi Bjorn, the only doubt I have is should these events not be on the control instead of on the layer? If you look at the GetFeature control they were added to the control and not to the layer (beforefeaturesselected and featuresselected).

Especially if you have a SelectFeature control which can switch to a different vector layer, it would be a hassle to change the listeners all the time, so having the events on the control makes more sense to me.

What do you think?

Note: See TracTickets for help on using tickets.