Skip to content

CRS Compatibility Check Fails When Terrain Layer Is Part of Background Group #12349

Description

@anup39

Description

When changing the map projection using the CRS selector, the application may show a false incompatibility warning. This happens because of a logic mismatch between how background layers are selected and how CRS compatibility is validated.

The background group includes all layers marked as group: "background", including the terrain layer. However, the CRS compatibility check in the CRS selector validates only the currently active background entry. If the active/visible entry happens to be the terrain layer, and terrain is not considered CRS-compatible in that validation, the selector incorrectly reports that the projection is incompatible—even though the actual map background is valid for the selected CRS.

https://github.com/geosolutions-it/MapStore2/blob/master/web/client/plugins/CRSSelector/containers/CRSSelector.jsx#L117

How to reproduce

  • Open a map with terrain background layer
  • Switch projection
  • An error appears saying that "The Projection you selected is not compatible with background. Switch to a compatible -or an empty- background, then select this projection."

Expected Result

The error shouldn't be displayed.

Current Result

The error prompt is preventing crs switch.

  • 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

Activity

  1. self-assigned this
    on May 7, 2026
  2. added this to the 2026.02.00 milestone on May 7, 2026
  3. added theissue type on May 7, 2026
  4. added a commit that references this issue on May 8, 2026
    23bc8ac
  5. added a commit that references this issue on May 20, 2026
    20d1296
  6. added a commit that references this issue on May 31, 2026
    1a14f7c
  7. added a commit that references this issue on Jun 1, 2026
    96d6e15
  8. added a commit that references this issue on Jun 4, 2026
    e2965f1
  9. added a commit that references this issue on Jun 19, 2026
    acb4f07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions