Skip to content

711 Let vector tile datasets set their own tile grid, defaulting to the OS grid - #712

Merged
dannyleech merged 1 commit into
mainfrom
711-dataset-tile-matrix-set
Nov 19, 2026
Merged

dannyleech merged 1 commit into
mainfrom
711-dataset-tile-matrix-set

Conversation

@dannyleech

Copy link
Copy Markdown
Contributor

Resolves #711.

In OpenLayers, vector tile datasets were all drawn using one fixed tile grid, so tiles from any server that cut them differently ended up in the wrong place. Datasets now use the OS National Grid tile grid by default, and a dataset on a different grid can set it with the new tileMatrixSet option next to tiles. GeoJSON datasets, MapLibre, Esri and basemaps aren't affected.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new default grid changes tile placement for two demo datasets, while source IDs still conflate datasets sharing a tile URL but using different grids.

2 open issues
What changed in this PR

Adds per-dataset tile-grid configuration for OpenLayers vector tiles, replacing the fixed grid with an OS-aligned default. GeoJSON, other providers, and basemaps retain their existing behavior.

Changes:

  • Passes tileMatrixSet from dataset definitions into OpenLayers source descriptors.
  • Builds custom square tile grids or uses the OS-aligned default.
  • Documents the option and adds tests for grid selection and descriptor propagation.
File Description
plugins/​datasets/​src/​registry/​dataset.js Exposes the dataset’s tileMatrixSet property.
plugins/​datasets/​src/​adapters/​openlayers/​registry/​openLayersDataset.test.js Tests grid configuration in source descriptors.
plugins/​datasets/​src/​adapters/​openlayers/​registry/​openLayersDataset.js Includes grid configuration in vector source descriptors.
plugins/​datasets/​src/​adapters/​openlayers/​layerBuilders.test.js Tests default and custom tile-grid geometry.
plugins/​datasets/​src/​adapters/​openlayers/​layerBuilders.js Constructs dataset-specific grids with an OS-aligned default.
docs/​plugins/​datasets.md Documents grid parameters, default bounds, and OpenLayers-only scope.

Review effort: Balanced

@dannyleech dannyleech changed the title Let vector tile datasets set their own tile grid, defaulting to the OS grid 711 Let vector tile datasets set their own tile grid, defaulting to the OS grid Nov 19, 2026
@sonarqubecloud

Copy link
Copy Markdown

@dannyleech
dannyleech merged commit 733fa0c into main Nov 19, 2026
7 checks passed
@dannyleech
dannyleech deleted the 711-dataset-tile-matrix-set branch November 19, 2026 12:45
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.

Let vector tile datasets set their own tile grid in OpenLayers

3 participants