Skip to content

Saved map resolutions and aligned with custom resolutions and projection of map#12443

Open
subashtiwari1010 wants to merge 2 commits into
geosolutions-it:masterfrom
subashtiwari1010:fix/projection-issue-11779
Open

Saved map resolutions and aligned with custom resolutions and projection of map#12443
subashtiwari1010 wants to merge 2 commits into
geosolutions-it:masterfrom
subashtiwari1010:fix/projection-issue-11779

Conversation

@subashtiwari1010
Copy link
Copy Markdown
Contributor

@subashtiwari1010 subashtiwari1010 commented May 29, 2026

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

  • Custom Resolutions: Can define resolution lists per SRS in localConfig.json; the plugin exposes them to the map on load and when the user changes CRS.
  • Map save/load: When the CRS changes, then the map resolutions are updated and saved in the map options, so it is saved for current projections and when loading the map it is taken from saved information; regarding the custom resolutions, it is taken from plugin config when needed.
  • Migration guide: Documents moving resolutions out of new.json into CRSSelector.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix

Issue

What is the current behavior?
The OOM behavior happens if the resolutions and projection are provided in new.json file 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)

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

Other useful information

…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.
@subashtiwari1010 subashtiwari1010 force-pushed the fix/projection-issue-11779 branch from 99488fe to 07262e1 Compare May 29, 2026 08:42
@subashtiwari1010 subashtiwari1010 marked this pull request as ready for review May 29, 2026 08:59
@subashtiwari1010 subashtiwari1010 requested a review from MV88 May 29, 2026 09:00
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.

Setting the map projection crashes MapStore if resolutions configured in new.json file with a different projection

2 participants