Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Find these components in the wild, including what we're learning through public

Different features rely on different APIs - namely from Ordnance Survey and Mapbox.

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.
You can set keys directly as props (eg `osApiKey`) on the applicable web components or [use a proxy](https://github.com/theopensystemslab/map/blob/main/docs/how-to-use-a-proxy.md) to mask these secrets.

Address autocomplete utilises the OS Places API.

Expand Down
4 changes: 2 additions & 2 deletions src/components/address-autocomplete/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ export class AddressAutocomplete extends LitElement {
initialAddress = "";

@property({ type: String })
osApiKey = import.meta.env.VITE_APP_OS_API_KEY || "";
osApiKey = "";

/**
* @deprecated - please set singular `osApiKey`
*/
@property({ type: String })
osPlacesApiKey = import.meta.env.VITE_APP_OS_PLACES_API_KEY || "";
osPlacesApiKey = "";

@property({ type: String })
osProxyEndpoint = "";
Expand Down
8 changes: 4 additions & 4 deletions src/components/my-map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,19 +200,19 @@ export class MyMap extends LitElement {
disableVectorTiles = false;

@property({ type: String })
osApiKey = import.meta.env.VITE_APP_OS_API_KEY || "";
osApiKey = "";

/**
* @deprecated - please set singular `osApiKey`
*/
@property({ type: String })
osVectorTilesApiKey = import.meta.env.VITE_APP_OS_VECTOR_TILES_API_KEY || "";
osVectorTilesApiKey = "";

/**
* @deprecated - please set singular `osApiKey`
*/
@property({ type: String })
osFeaturesApiKey = import.meta.env.VITE_APP_OS_FEATURES_API_KEY || "";
osFeaturesApiKey = "";

@property({ type: String })
osCopyright =
Expand All @@ -228,7 +228,7 @@ export class MyMap extends LitElement {
applySatelliteStyle = false;

@property({ type: String })
mapboxAccessToken = import.meta.env.VITE_APP_MAPBOX_ACCESS_TOKEN || "";
mapboxAccessToken = "";

@property({ type: Boolean })
hideResetControl = false;
Expand Down
Loading