@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 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
@@ -1,4 +1,4 @@
1
- import { A as s, M as a, P as r } from "./index-CXqLab25.mjs";
1
+ import { A as s, M as a, P as r } from "./index-CnbGXbu3.mjs";
2
2
  export {
3
3
  s as AddressAutocomplete,
4
4
  a as MyMap,