Repository navigation
Saved map resolutions and aligned with custom resolutions and projection of map - #12443
Conversation
…s MapStore causing OOM if resolutions configured in new.json file with a different projection (geosolutions-it#11788)" (geosolutions-it#11821) This reverts commit f337dbb.
99488fe to
07262e1
Compare
|
@subashtiwari1010 can you please fix conflicts here? Thanks. |
MV88
left a comment
There was a problem hiding this comment.
can you check this branch where i customized the cfg also check lastest commit
https://github.com/geosolutions-it/MapStore2/tree/11779_test
because when i load locally http://localhost:8081/?debug=true#/viewer/60692
then trying to select 3003 in the crs selecor app froze and idk if it is related to the values inserted or else.
can you do a check there or provide in this branch changes to config that can be used for testing ?
Recommended test configurationUse this in "CRSSelector": {
"cfg": {
...,
"availableProjections": [
{ "value": "EPSG:4326", "label": "EPSG:4326" },
{ "value": "EPSG:3857", "label": "EPSG:3857" },
{ "value": "EPSG:3003", "label": "EPSG:3003" }
],
"customResolutions": {
"EPSG:3003": [
2366.978752455357,
1183.4893762276786,
591.7446881138393,
295.87234405691964,
147.93617202845982,
73.96808601422991,
36.984043007114956,
18.492021503557478,
9.246010751778739,
4.623005375889369,
2.3115026879446847,
1.1557513439723424,
0.5778756719861712,
0.2889378359930856,
0.1444689179965428,
0.0722344589982714,
0.0361172294991357,
0.01805861474956785,
0.009029307374783925,
0.004514653687391962,
0.002257326843695981,
0.0011286634218479906,
0.0005643317109239953,
0.00028216585546199765
]
}
}
}The "EPSG:3003": [
156543.03392804097,
78271.51696402048,
...
0.29858214173896974
]They are not valid for EPSG:3003. Root cause: wrong resolution values
Computed from the recommended The maxResolution based on the extent is closer to the recommended value for the EPSG:3003 CRS. Why this causes freeze / OOM
|
1b3ad23 to
90ad5bf
Compare
MV88
left a comment
There was a problem hiding this comment.
|
@MV88 waiting for your review please. |
|
Successfully created backport PR for |
…ion of map (#12443) (#12567) * Reapply "#11779: FIX Setting the map projection freezes MapStore causing OOM if resolutions configured in new.json file with a different projection (#11788)" (#11821) This reverts commit f337dbb. * Save resolutions for maps and use customResolutions configuration * Update configuration for CRSSelector customResolutions in migration guide * Remove the projection from view in mapOptions * Fix unit tests (cherry picked from commit 5b9ed8b) Co-authored-by: Sovas Tiwari <[email protected]>

Description
This PR reapplies the reverted fix from #11821, which prevents map freezes and OOM errors when the CRS changes while saved resolutions still belong to another projection. It also moves custom resolutions to per-CRS configuration in CRSSelector, so the CRS and its resolutions stay aligned when switching projections and when saving the map.
Changes
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?
The OOM behavior happens if the resolutions and projection are provided in
new.jsonfile and user switch to different projection rather than the resolutions one.#11779 (comment)
What is the new behavior?
When you change the map CRS, the custom resolutions configured for that CRS in CRSSelector is applied (or computes them if it is not set) and saves them with the map so they stay aligned on reload.
Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information