@defra/interactive-map 0.0.25-alpha → 0.0.26-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.
@@ -26,6 +26,36 @@ Allows the OpenLayers provider to support raster, standard vector tile, and OGC
26
26
 
27
27
  ---
28
28
 
29
+ ### `renderMode`
30
+ **Type:** `'hybrid' | 'vector'`
31
+
32
+ > [!NOTE]
33
+ > This property is only relevant when using the **OpenLayers provider** with vector tile styles (standard or `'ogc-vt'`). It is ignored for raster styles and by other providers.
34
+
35
+ Sets the render mode on the OpenLayers `VectorTileLayer`. When omitted, OpenLayers defaults to `'hybrid'`.
36
+
37
+ - `'hybrid'` (default) — polygon and line elements are rendered as images, so pixels are scaled during zoom animations. Point symbols and texts are accurately rendered as vectors and can stay upright on rotated views, but get lifted above all polygon and line elements.
38
+ - `'vector'` — everything is rendered as vectors and the original render order is maintained. Use this mode for improved performance and visual experience on vector tile layers with not too many rendered features (e.g. for highlighting a subset of features of another layer with the same source).
39
+
40
+ ```js
41
+ // Standard vector tile
42
+ {
43
+ id: 'outdoor',
44
+ url: 'https://raw.githubusercontent.com/OrdnanceSurvey/OS-Vector-Tile-API-Stylesheets/main/OS_VTS_27700_Outdoor.json',
45
+ renderMode: 'vector'
46
+ }
47
+
48
+ // OGC vector tile
49
+ {
50
+ id: 'outdoor-ngd',
51
+ type: 'ogc-vt',
52
+ url: 'https://api.os.uk/maps/vector/ngd/ota/v1/collections/ngd-base/styles/27700?key=YOUR_API_KEY',
53
+ renderMode: 'vector'
54
+ }
55
+ ```
56
+
57
+ ---
58
+
29
59
  ### `url`
30
60
  **Type:** `string`
31
61
  **Required**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra/interactive-map",
3
- "version": "0.0.25-alpha",
3
+ "version": "0.0.26-alpha",
4
4
  "description": "An accessible map component",
5
5
  "repository": {
6
6
  "type": "git",