Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#10026: Interactive legend for TOC layers [Vector layer part] #10188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mahmoudadel54
Copy link
Contributor

Description

In this PR, interactive legend functionality for WMS/WFS layers is implemented. User can configure enabling the interactive legend for vector layer from display tab in layer settings. Legend filter will be reset if user change the style and user can reset it manually by clicking on the selected filter legend again to remove the legend filter.

This PR includes:

  • Adding interactive legend for vector layers
  • Add checkbox for enable the interactive legend for vector into layer settings
  • handle the logic of filter by legend for vector layer in case of 2d openlayer map and 3d cesium map
  • write unit tests based on code changes

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

#10026

What is the current behavior?
#10026

What is the new behavior?
User can add vector layer and enable the interactive legend to enable him/her to filter the layer if user change style that includes filter expressions like classification style for example.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

…r part]

- Adding interactive legend for vector layers
- Add checkbox for enable the interactive legend for wfs and vector into layer settings and for the catalog as well [just for wfs]
- handle the logic of filter by legend for vector layer in case of 2d openlayer map and 3d cesium map
- write unit tests based on code changes
@mahmoudadel54 mahmoudadel54 added this to the 2024.01.02 milestone Apr 11, 2024
@mahmoudadel54 mahmoudadel54 self-assigned this Apr 11, 2024
@mahmoudadel54 mahmoudadel54 linked an issue Apr 11, 2024 that may be closed by this pull request
6 tasks
@mahmoudadel54 mahmoudadel54 marked this pull request as ready for review April 11, 2024 09:15
@tdipisa tdipisa modified the milestones: 2024.01.02, 2024.02.00 Apr 11, 2024
@tdipisa tdipisa removed a link to an issue Apr 29, 2024
6 tasks
@tdipisa tdipisa linked an issue Apr 29, 2024 that may be closed by this pull request
6 tasks
Copy link
Contributor

@allyoucanmap allyoucanmap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR contains outdated code that was removed and improved inside the work done for #10180, #10249 and #10426.
The mentioned outdated code refers to the LAYER_FILTER_BY_LEGEND and RESET_LAYER_FILTER_BY_LEGEND actions and related implementations including epics.
Apart from the outdated code also the general filter approach on the Vector and WFS layers should be reviewed and implemented separately.
Note that WFS layers currently apply CQL to a new request every time the layerFilter is updated, this could work for the QueryPanel but it could be a problem with legend because we will trigger a request every time we select a legend item. If possible both vector and wfs should be filtered client side.
Here a list of requirements needed for this implemenentation to discuss:

  • Include the support of style filter in the filter system. This should be a new type to add as we have cql one and not the parseGeoStylerFilterToCql function. A user should be able to add an new format object to layerFilter as { format: 'style', body: [ ...style filter here ] } (format name TBD)
  • VectorLegend component needs to support the on click action adding the filter value as is to layerFilter with id
  • All implementation of WFS layer OpenLayers, Cesium and Leaflet should implement a way to filter the data, using CQL is the current one but it would be interesting to apply filter client side
  • All implementation of Vector layer OpenLayers, Cesium and Leaflet should implement a way to filter the data client side using the layer filter

@tdipisa tdipisa modified the milestones: 2024.02.00, 2025.01.00 Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interactive legend for TOC layers
3 participants