Repository navigation
711 Let vector tile datasets set their own tile grid, defaulting to the OS grid - #712
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 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
tileMatrixSetfrom 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
|
markfee
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





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
tileMatrixSetoption next totiles. GeoJSON datasets, MapLibre, Esri and basemaps aren't affected.