Skip to content

Fix issue with IM datasets when multiple maps on the same page - #485

Open
davidjamesstone wants to merge 4 commits into
mainfrom
fix/boundary-issue-with-multiple-maps-on-page
Open

davidjamesstone wants to merge 4 commits into
mainfrom
fix/boundary-issue-with-multiple-maps-on-page

Conversation

@davidjamesstone

Copy link
Copy Markdown
Contributor

Proposed change

When multiple maps are on the same page and datasets are configured (SSSI or country boundary) then the latter maps also get initialised with the same datasets as those above it when they shouldn't be.

This PR currently contains half the fix but we need to wait for an update to IM to make datasets not work globally (which Dan L is aware of and fixing)

Jira ticket: https://eaflood.atlassian.net/browse/DF-1571

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Misc. (documentation, build updates, etc)

Checklist

  • You have executed this code locally and it performs as expected.
  • You have added tests to verify your code works.
  • You have added code comments and JSDoc, where appropriate.
  • There is no commented-out code.
  • You have added developer docs in README.md and docs/* (where appropriate, e.g. new features).
  • The tests are passing (npm run test).
  • The linting checks are passing (npm run lint).
  • The code has been formatted (npm run format).

- Updated @defra/interactive-map from 0.0.33-alpha to ^0.0.56-alpha in package.json.
- Changed import for createDrawPlugin from draw-ml to draw in geospatial-map.js and map.test.js.
- Added workerPath configuration for maplibre-gl worker in map.js.
- Updated map creation logic to include workerPath in createMap function.
- Added ignoreWarnings for maplibre-gl in webpack.config.js to suppress critical dependency warnings.
@sonarqubecloud

Copy link
Copy Markdown

@davidjamesstone davidjamesstone changed the title Refactor map configuration to use getDefaultConfig function and update dataset plugin initialization Fix issue with IM datasets when multiple maps on the same page Oct 23, 2026
@davidjamesstone
davidjamesstone marked this pull request as ready for review October 23, 2026 16:09

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant