#11162: Improve MS actions to automatically zoom to filtered features#11163
#11162: Improve MS actions to automatically zoom to filtered features#11163MV88 merged 3 commits intogeosolutions-it:masterfrom
Conversation
…ltered features - enhance zooming functionality if the queried layers is just one by auto zooming - automate that zoom process without the need to include any coordinates - add unit tests
There was a problem hiding this comment.
After synching with @tdipisa we decided to apply these expected behaviours
- when no center, marker, bbox or zoom are provided as query params the zoom to feature bbox must not be used.
so
the following will use map zoom level but will override center
https://dev-mapstore.geosolutionsgroup.com/mapstore/#/viewer/51039?mapInfo=gs:us_states&mapInfoFilter=STATE_NAME='Maine'¢er=12,15
same in the case of marker prop
https://dev-mapstore.geosolutionsgroup.com/mapstore/#/viewer/51039?mapInfo=gs:us_states&mapInfoFilter=STATE_NAME='Maine'&marker=3,6
this will use map center but will override zoom level
https://dev-mapstore.geosolutionsgroup.com/mapstore/#/viewer/51039?mapInfo=gs:us_states&mapInfoFilter=STATE_NAME='Maine'&zoom=15
this will zoom to the extent provided in bbox param
https://dev-mapstore.geosolutionsgroup.com/mapstore/#/viewer/51039?mapInfo=gs:us_states&mapInfoFilter=STATE_NAME='Maine'&bbox=8,8,53,53
this will generate featurebbox and zoom to its extent
https://dev-mapstore.geosolutionsgroup.com/mapstore/#/viewer/51039?mapInfo=gs:us_states&mapInfoFilter=STATE_NAME='Maine'
- handle when no center, marker, bbox or zoom are provided as query params the zoom to feature bbox must not be used - add unit tests - add jsdocs
MV88
left a comment
There was a problem hiding this comment.
this looks not to be working, seems that bbox alone is not enough to zoom to it
I have checked it locally and it seems work 2025-06-16.17-40-58.mp4 |
|
@ElenaGallo please test it in DEV |
|
Test passed, @mahmoudadel54 backport to 2025.01.xx. Thanks |
…ltered features (geosolutions-it#11163) * geosolutions-it#11162: Improve MS actions to automatically zoom to filtered features - enhance zooming functionality if the queried layers is just one by auto zooming - automate that zoom process without the need to include any coordinates - add unit tests * resolve review comments: - handle when no center, marker, bbox or zoom are provided as query params the zoom to feature bbox must not be used - add unit tests - add jsdocs * resolve FE test failure in QueryParamsUtils
Backport is done ---> #11226 |
…#11163) (#11226) * #11162: Improve MS actions to automatically zoom to filtered features - enhance zooming functionality if the queried layers is just one by auto zooming - automate that zoom process without the need to include any coordinates - add unit tests * resolve review comments: - handle when no center, marker, bbox or zoom are provided as query params the zoom to feature bbox must not be used - add unit tests - add jsdocs * resolve FE test failure in QueryParamsUtils
Description
This PR enhances the zoom process to the filter features using query params action. It includes:
This PR addresses 2 handles 2 points:
MapStore2/web/client/epics/identify.js
Line 286 in d13f842
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
#11162
What is the current behavior?
#11162
What is the new behavior?
When a user opens the map viewer with a query parameter that includes 'mapinfo' and 'mapInfoFilter', but without specifying any coordinates, the application will automatically zoom to the bounding box of the filtered feature. For example, accessing the following URL:
will result in the map automatically zooming to the extent of the filtered feature.
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information