@opensystemslab/map 0.8.3 → 1.0.0-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +20 -0
- package/dist/component-lib.es.js +1 -1
- package/dist/component-lib.umd.js +116 -109
- package/dist/{html2canvas.esm-CKxSAI8P.mjs → html2canvas.esm-d2sM-0Wm.mjs} +54 -70
- package/dist/{index-CXqLab25.mjs → index-CnbGXbu3.mjs} +43733 -40342
- package/dist/{index.es-Cd2avOFl.mjs → index.es-iycsZptI.mjs} +167 -292
- package/dist/index.html +15 -8
- package/dist/{purify.es-ggP5g4xx.mjs → purify.es-B7BPtUgm.mjs} +9 -18
- package/dist/style.css +1 -1
- package/package.json +12 -12
- package/types/components/address-autocomplete/index.d.ts +5 -1
- package/types/components/my-map/drawing.d.ts +6 -5
- package/types/components/my-map/index.d.ts +35 -4
- package/types/components/my-map/layers.d.ts +10 -0
- package/types/components/my-map/os-features.d.ts +2 -2
- package/types/components/my-map/utils.d.ts +3 -3
- package/types/components/my-map/os-layers.d.ts +0 -5
- /package/types/components/my-map/{os-layers.test.d.ts → layers.test.d.ts} +0 -0
package/README.md
CHANGED
@@ -29,6 +29,26 @@ These web components can be used independently or together following GOV.UK's [A
|
|
29
29
|
|
30
30
|
Find these components in the wild, including what we're learning through public beta user-testing, at [https://www.ripa.digital/](https://www.ripa.digital/).
|
31
31
|
|
32
|
+
## Bring your own API keys
|
33
|
+
|
34
|
+
Different features rely on different APIs - namely from Ordnance Survey and Mapbox.
|
35
|
+
|
36
|
+
You can set keys directly as props (eg `osApiKey`) on the applicable web components or via environment variables (eg `VITE_APP_OS_API_KEY`) for local development.
|
37
|
+
|
38
|
+
Address autocomplete utilises the OS Places API.
|
39
|
+
|
40
|
+
For the map:
|
41
|
+
- The `basemap` prop defaults to `"OSVectorTile"` which requires the OS Vector Tiles API
|
42
|
+
- Basemap `"OSRaster"` uses the OS Maps API
|
43
|
+
- Basemap `"MapboxSatellite"` requires a Mapbox Access Token with with scope `style:read`
|
44
|
+
- The `"OSM"` (OpenStreetMap) basemap is available for users without any keys, and as a fallback if any of the above basemaps fail to build
|
45
|
+
- `clickFeatures` requires the OS Features API
|
46
|
+
|
47
|
+
When using Ordnance Survey APIs:
|
48
|
+
- Update the `osCopyright` attribution prop with your license number
|
49
|
+
- Configure an optional `osProxyEndpoint` to avoid exposing your keys (set this instead of `osApiKey`)
|
50
|
+
- ** We are not currently supporting a similar proxy for Mapbox because access tokens can be restricted to specific URLs via your account
|
51
|
+
|
32
52
|
## Running locally
|
33
53
|
|
34
54
|
- Rename `.env.example` to `.env.local` and replace the values - or simply provide your API keys as props
|
package/dist/component-lib.es.js
CHANGED