You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OL Map component requires a minor enhancement in updating the map position from props, especially the center. Currently, an exact match is performed, leading to a map view update even when the difference is <= 0.00000001. This value is reprojected, causing a minor fractional difference, which in turn triggers onMapViewChange, updating the props and leading to a multiple update.
dsuren1
changed the title
Enhance OL map component for updating map position based on center comparison
Enhance OL map component in updating map position based on center
Aug 30, 2024
MV88
added
BackportNeeded
Commits provided for an issue need to be backported to the milestone's stable branch
and removed
BackportNeeded
Commits provided for an issue need to be backported to the milestone's stable branch
labels
Aug 30, 2024
dsuren1
added a commit
to dsuren1/MapStore2
that referenced
this issue
Aug 30, 2024
Description
The OL Map component requires a minor enhancement in updating the map position from props, especially the center. Currently, an exact match is performed, leading to a map view update even when the difference is
<= 0.00000001
. This value is reprojected, causing a minor fractional difference, which in turn triggers onMapViewChange, updating the props and leading to a multiple update.MapStore2/web/client/components/map/openlayers/Map.jsx
Lines 540 to 546 in 04e8784
To avoid unnecessary updates, a nearly equal match is more suitable in these scenarios instead of performing an exact match.
What kind of improvement you want to add? (check one with "x", remove the others)
Other useful information
This update is needed for downstream project where a similar scenario is observed when using certain CRS
The text was updated successfully, but these errors were encountered: