Support of getfeatureinfo to change by time#11330
Support of getfeatureinfo to change by time#11330offtherailz merged 6 commits intogeosolutions-it:masterfrom
Conversation
offtherailz
left a comment
There was a problem hiding this comment.
Technically works, but there is something not necessary.
In case of different options etc... I'm not sure if it will work. See my suggestion below and try
web/client/epics/identify.js
Outdated
| const state = getState(); | ||
| const groups = rawGroupsSelector(state); | ||
| const queryableLayers = reverse(getDerivedLayersVisibility(queryableLayersSelector(state), groups)); | ||
| const filterNameList = queryableLayers.filter(({ id, visibility }) => visibility && layer.includes(id)).map(({ name }) => name); | ||
| const overrideParams = filterNameList.reduce((obj, filterName) => ({ ...obj, [filterName]: params}), {}); |
There was a problem hiding this comment.
OverrideParams doesn't look to be necessary. I removed it and it works anyway. Did you needed to use it for some reason?
But for other params, I'm not sure they can all be reproduced except this.
I'd suggest to use as sample onUpdateFeatureInfoClickPoint epic, that should do more or less what we should do...
Did you tried to do it yet?
There was a problem hiding this comment.
Used the OverrideParams to use the parameters that have been updated.
As in the layers tree, the time params are updated when there are changes made, the updated layers are used in the featureInfoClick function, so even if the OverrideParams is not passed, the functionality works.
As for other parameters, I have taken the reference from onUpdateFeatureInfoClickPoint and made the necessary changes to the function.
There was a problem hiding this comment.
It works well.
I noticed that if I have 2 time layers and ( e.g. raster_speed and vector_speed, or meteorilte landings) and I selectr in feature info combobox on top a different layer, when I update the feature info with timeline change, the selection resets. This happens also with coordinate change, so it is consistent with other solutions...
This for navigation can be annoying, anyway not blocking, the user can select the single layer and go on.
Video.del.2025-07-21.18-10-02.mp4
Maybe we can improve it somehow, but I don't want to break things to have this behavior (e.g. what happens if I keep selection but next version do not have information for the given layer...
Can you try to keep selected layer and see the various use case, to see if it somehow can break something or if it is a safe thing?
@offtherailz I have updated the functionality, so that it will always keep the last selected layer, and will update to new layer only when there is no information for the selected layer. |
Description
This PR fixes issue #11327. It adds the support of the getFeatureInfo for layers in the Info popup when the time changes from the Timeline Plugin.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
Even if the time in the Timeline plugin is updated, the feature information does not change, as no API calls are made.
Fix #11327
What is the new behavior?
When the time changes, the API request for the getFeatureInfo is made, hence updating the information in the Feature info popup.
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information