Ticket #2781 (new feature)

Opened 4 years ago

Last modified 3 years ago

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

Description

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

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

Change History

Changed 4 years ago by bjornharrtell

Initial implementation

Changed 3 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.