geosolutions-it / MapStore2

The solution to create and share maps, dashboards, geostories with 3D support on the web. And it is open-source too!
https://mapstore.geosolutionsgroup.com/
Other
509 stars 395 forks source link

Improvements to feature selection tools #6625

Open giohappy opened 3 years ago

giohappy commented 3 years ago

What we have

Mapstore2, and the FeatureGrid (FG) in particular, is using a mix of filtering and selection to mimic the features selection functionalities. This approach has been adopted to overcome the lack of a proper "selection" component, but the result is that some functionalities have misleading behaviour and some nice to have tools can't be implemented.

Within the context of the FG, filtering adopted to implement click / box selection on the map, when the marker icon at the beginning of the FG columns is toggled.

image

On the other side, selection is used for (single) selection of an item inside the FG table in read mode, or (multi) selection by toggling the chckbox of a row in edit mode.

Misleading behaviours

The problems with this mixed approach are paritcularly visible when the user is in edit mode. In this case we have the following behaviours:

  1. click / ALT + drag on the map with the filter tool -> a filter is created
  2. the filtered features are automatically selected inside thr FG table -> the user assumes that only a selection was performed, but a filter is also applied instead, and you can only see it if the synk map button is toggled
  3. Uncheck a row in the FG table -> the user is unselecting the feature, but it's not removed from the map filter
  4. check the same row again -> here there must be a small bug, since this action uncheck all the other rows. In any case the filter is never changed

What we miss

Proposal

A better approach would be to create a suite of selection tools for the map, and do not use the spatial filtering to mimic it. In my opinion the spatial filtering tools should be removed from the FG. I'm thinking to something like the selection tools in QGIS:

image

Once the selection tools are in place, we should also have the ability to manage the selection inside the FG table. In QGIS we have the following tools. "Show only selected features" is probably the most useful. It would do something similar to what we have now when the filter is active.

image

offtherailz commented 3 years ago

Thanks @giohappy

This issue involves also some aspects from the following list of issues:

We may need a mockup ? I think it could be very simple. Adding these two button in the toolbar (replace the current filter button with a menu, and adding a select button). The quick spatial filter (marker icon) at this point can be removed.

I'm going to think on this feature proposal to create a final proposal detailed in terms of tasks on MapStore.

Please @tdipisa take a look at it. In terms of functionalities a solution like this looks more intuitive and powerful. We have to integrate this with virtual scrolling, map sync, quick filters, editing ... so we need to have a clear idea of the final result we are going to reach, in order to well define all interactions and tasks.