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

Fix - OL map component in updating map position based on center #10793

Closed
1 task done
dsuren1 opened this issue Jan 31, 2025 · 1 comment · Fixed by #10847 or #10943
Closed
1 task done

Fix - OL map component in updating map position based on center #10793

dsuren1 opened this issue Jan 31, 2025 · 1 comment · Fixed by #10847 or #10943
Assignees
Milestone

Comments

@dsuren1
Copy link
Contributor

dsuren1 commented Jan 31, 2025

Description

Recently, a change (#10521) was introduced to enhance the OL map component by improving how it updates the map position based on the center, allowing for an acceptable decimal change (inspired by another map component in MS). This involved formulating a nearlyEqual function to determine when an update should occur. However, there are cases where the current value is smaller than the new value, resulting in a negative difference and causing the map update to be missed.

We would like to enhance this function to be versatile

How to reproduce

  • Open a map
  • Save the map with default center
  • Perform a query param such that the map is shifted to east so that latitude of new center is lesser than current center. try using this query param on a map with default saved center. Note: Make sure centerToMarker: true in mapInfo state.
?actions=[{"type":"SEARCH:SCHEDULE_SEARCH_WITH_FILTER","cql_filter":"STATE_FIPS=34","layer":"gs:us_states"},{"type":"CATALOG:ADD_LAYERS_FROM_CATALOGS","layers":["gs:us_states"],"sources":[{"type":"WMS","url":"https://gs-stable.geo-solutions.it/geoserver/wms"}]}]
  • Observe that the map is not re-centered

Expected Result
Map should recenter under valid case

Current Result
Map is not recentered in the above mentioned case

  • Not browser related
Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users)
Browser Affected Version
Internet Explorer
Edge
Chrome
Firefox
Safari

Other useful information

@dsuren1
Copy link
Contributor Author

dsuren1 commented Mar 7, 2025

Closing in favour of #10847

@dsuren1 dsuren1 closed this as completed Mar 7, 2025
@dsuren1 dsuren1 linked a pull request Mar 7, 2025 that will close this issue
12 tasks
@tdipisa tdipisa added this to the 2025.01.00 milestone Mar 7, 2025
@ElenaGallo ElenaGallo self-assigned this Mar 10, 2025
@ElenaGallo ElenaGallo added Accepted BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch and removed Accepted labels Mar 10, 2025
@tdipisa tdipisa removed the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment