@defra/interactive-map 0.0.46-fmp-2 → 0.0.47-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -100,7 +100,10 @@ URL that returns a Mapbox GL style document (Mapbox Style Specification).
100
100
  ### `params`
101
101
  **Type:** `Object`
102
102
 
103
- WMS request parameters. Passed directly to the OpenLayers `TileWMS` source when `type` is `'wms'`. Most WMS GetMap requests should include `LAYERS`.
103
+ > [!NOTE]
104
+ > This property is only relevant when using the **OpenLayers provider** with `type: 'wms'`. It is ignored by other providers and by other `type` values.
105
+
106
+ WMS request parameters. Passed directly to the OpenLayers `TileWMS` source. Most WMS GetMap requests should include `LAYERS`.
104
107
 
105
108
  ```js
106
109
  {
@@ -112,6 +115,24 @@ WMS request parameters. Passed directly to the OpenLayers `TileWMS` source when
112
115
 
113
116
  ---
114
117
 
118
+ ### `extent`
119
+ **Type:** `[number, number, number, number]`
120
+
121
+ > [!NOTE]
122
+ > This property is only relevant when using the **OpenLayers provider** with `type: 'raster'`. A bare XYZ tile URL template has no capabilities document to determine real coverage from, so the consumer configuring the style must supply it directly. It is ignored by other providers and by other `type` values.
123
+
124
+ Bounding box `[minX, minY, maxX, maxY]` in EPSG:27700 — the units the OpenLayers provider's tile grid is built in. When set, no tiles outside this area are requested, avoiding failed tile requests where the basemap has no coverage. Omit to request tiles across the whole tile grid regardless of real coverage (the default). Only limits which tiles are *requested* — panning and zooming outside the extent is unaffected.
125
+
126
+ ```js
127
+ {
128
+ type: 'raster',
129
+ url: 'https://api.os.uk/maps/raster/v1/zxy/Outdoor_27700/{z}/{x}/{y}.png?key=YOUR_API_KEY',
130
+ extent: [-238375, 0, 700000, 1300000] // OS National Grid coverage
131
+ }
132
+ ```
133
+
134
+ ---
135
+
115
136
  ### `label`
116
137
  **Type:** `string`
117
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra/interactive-map",
3
- "version": "0.0.46-fmp-2",
3
+ "version": "0.0.47-alpha",
4
4
  "description": "An accessible map component",
5
5
  "repository": {
6
6
  "type": "git",