@opensystemslab/map 0.8.2 → 1.0.0-alpha.0
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.
- package/README.md +20 -0
- package/dist/component-lib.es.js +1 -1
- package/dist/component-lib.umd.js +131 -111
- package/dist/{html2canvas.esm-DbilGY6A.mjs → html2canvas.esm-d2sM-0Wm.mjs} +55 -71
- package/dist/{index-1HbxZ3C1.mjs → index-BcNEfKoK.mjs} +44179 -40735
- package/dist/{index.es-BF5JbvAz.mjs → index.es-DNpy3O6w.mjs} +1405 -1511
- package/dist/index.html +13 -8
- package/dist/purify.es-B7BPtUgm.mjs +471 -0
- package/dist/style.css +1 -1
- package/package.json +18 -13
- 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 +34 -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/dist/purify.es-D6iZHRnd.mjs +0 -471
- 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