Skip to content

Support of getfeatureinfo to change by time#11330

Merged
offtherailz merged 6 commits intogeosolutions-it:masterfrom
subashtiwari1010:fix/getfeatureinfo-11325
Jul 22, 2025
Merged

Support of getfeatureinfo to change by time#11330
offtherailz merged 6 commits intogeosolutions-it:masterfrom
subashtiwari1010:fix/getfeatureinfo-11325

Conversation

@subashtiwari1010
Copy link
Copy Markdown
Contributor

@subashtiwari1010 subashtiwari1010 commented Jul 18, 2025

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)

  • 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

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)

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

Other useful information

@subashtiwari1010 subashtiwari1010 self-assigned this Jul 18, 2025
@subashtiwari1010 subashtiwari1010 marked this pull request as ready for review July 18, 2025 09:49
@subashtiwari1010 subashtiwari1010 changed the title Fix/getfeatureinfo 11325 Support of getfeatureinfo to change by time Jul 18, 2025
Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

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

Comment on lines +457 to +461
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}), {});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

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 offtherailz added this to the 2025.02.00 milestone Jul 22, 2025
@subashtiwari1010
Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

Approved, fantastic 🚀

@offtherailz offtherailz merged commit 659fb0e into geosolutions-it:master Jul 22, 2025
6 checks passed
subashtiwari1010 added a commit to subashtiwari1010/MapStore2 that referenced this pull request Jul 31, 2025
ale-cristofori pushed a commit that referenced this pull request Oct 8, 2025
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.

Support of getfeatureinfo to change by time

2 participants