-
Notifications
You must be signed in to change notification settings - Fork 409
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 [WMS] #10180
#10026: Interactive legend for TOC layers [WMS] #10180
Conversation
Description: - Adding interactive legend for wms layers - Add checkbox for enable the interactive legend for wms into layer settings and for the catalog as well
Description: - implement reset legend filter in case changing styles for WMS
Description: - Adding interactive legend for wfs and 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] - write unit tests based on code changes
- Merge branch 'master' into feature_10026_backup - edit in some unit tests - remove implementation of vector layer temp.
- fix FE test failure
- edit loopFilterArrayToFilterObject method in StyleEditorUtils file to handle the subgroups in geostyle filter - write a unit test for it
- enhance epics related to interactive legend - remove duplicated file
- isolate WMS interactive legend code and remove WFS part - edit some unit tests
- clean the code by remove all non related to wms interactive legend part
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some other part to review:
- if the filter is disabled (filter icon black) it should not be possible to interact with the legend, so the cursor should not be pointer and the hover state should not be visible.
- for some layer the json legend is not available even if the server supports it (eg. Meteorite_Landings_from_NASA_Open_Data_Portal). How should we handle this? (cc @tdipisa ). This happens also with raster layer
<ServiceException>
java.lang.IllegalArgumentException: Trying to evaluate the function as Object but the method parameter is set as COLOR
Trying to evaluate the function as Object but the method parameter is set as COLOR
</ServiceException>
web/client/components/catalog/editor/AdvancedSettings/RasterAdvancedSettings.js
Outdated
Show resolved
Hide resolved
web/client/components/widgets/builder/wizard/map/MapOptions.jsx
Outdated
Show resolved
Hide resolved
I think something like a kind of generic message in the legend section informing that the legend cannot be visualized with a proper L&F. Then, if the user move the mouse hover it an info popup appears to explain why including some more specific details coming from the service exception the client receives. |
…iew comments] - Refactor the filter legend and reset filter legend and create utils - Handle multi-select legend filter - handle adding popover info for failure getting json legend - adding popover info show how to apply legend filter - edit toc style - remove unused epics and actions - add translations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…iew comments] - remove the code that is not related to wms - remove unused unit tests - edit translations
…iew comments] - remove unnecessary spaces
…iew comments] - fix FE failure
Update StyleList-test.jsx
* revert wrong pushed code into test file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some finel changes:
- when a item of the legend has no filter it should not show the pointer cursor and the hover highlight
- please add some unit tests for the new two functions in FIlterUtils
…iew comments] - remove hover/highlight effect if legend rule doesn't have filter statement in wms json legend - write unit tests for 'updateLayerLegendFilter' and 'resetLayerLegendFilter' FilterUtils
@ElenaGallo please test this new feature on dev, thanks |
@mahmoudadel54 here what I found after my test:
11.mp4
2.mp4
3.mp4
4.mp4 |
@mahmoudadel54 here what I found after my test:
@mahmoudadel54 this need to be fixed asap. It should be a quick thing to fix.
We know that @ElenaGallo. This is an expected behavior for the moment. Since it is not possible yet in GS to filter the JSON legend according to the general filter defined in 'Layer filter', if you click on a style class not matching that filter the result if an empty layer in map. I suggest anyway to open a dedicated issue for this right now. @ElenaGallo please create it.
The current implementation is partial and provides support only for the map viewer. We have already an issue defined for this purpose in #10235. That means that until we don't have a working implementation for Dashboards, the Enable interactive legend option should not be available there @mahmoudadel54
@mahmoudadel54 is it possible to provide a quick fix for this? Otherwise the same as above for Dashboard is valid and a dedicated issue should be opened similar to #10235 |
Description
In this PR, interactive legend functionality for WMS layers is implemented. User can configure enabling the interactive legend from advanced settings in catalog or from display tab in layer settings.
CQL filter format is used to apply this kind of layer filter. User can click on the interactive legend if the legend contain 'filter' expressions and it will reflect on the map. Any type of filter rather than the legend filter will keep the legend filter beside it.
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.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
#10026
What is the current behavior?
#10026
What is the new behavior?
User now can configure and enable interactive legend for WMS and apply filter based on legend filter values from TOC
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information