Add customizable tile server
This commit is contained in:
parent
6fad8b7fac
commit
0d54fa29a9
@ -33,6 +33,8 @@ adapt the behavior to your needs.
|
|||||||
* `PUBLIC_PATH=https://.../foobar` to serve the app from a subdirectory.
|
* `PUBLIC_PATH=https://.../foobar` to serve the app from a subdirectory.
|
||||||
* `API_BASE_URL=https://...` to specify the location of the server (defaults
|
* `API_BASE_URL=https://...` to specify the location of the server (defaults
|
||||||
to `/`). The value should end with a trailing slash.
|
to `/`). The value should end with a trailing slash.
|
||||||
|
* `TILE_SERVER=` to pass a specific tile server to use rather than the default
|
||||||
|
one.
|
||||||
|
|
||||||
|
|
||||||
## Server part
|
## Server part
|
||||||
|
@ -2,4 +2,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
NODE_ENV: '"production"',
|
NODE_ENV: '"production"',
|
||||||
API_BASE_URL: JSON.stringify(process.env.API_BASE_URL),
|
API_BASE_URL: JSON.stringify(process.env.API_BASE_URL),
|
||||||
|
TILE_SERVER: JSON.stringify(process.env.TILE_SERVER),
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ L.Icon.Default.mergeOptions({
|
|||||||
export const DEFAULT_ZOOM = 17;
|
export const DEFAULT_ZOOM = 17;
|
||||||
export const MIN_ZOOM = 15;
|
export const MIN_ZOOM = 15;
|
||||||
export const MAX_ZOOM = 18;
|
export const MAX_ZOOM = 18;
|
||||||
export const TILE_SERVER = 'http://a.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png';
|
export const TILE_SERVER = process.env.TILE_SERVER || 'https://a.tile.thunderforest.com/cycle/{z}/{x}/{y}.png';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
Loading…
Reference in New Issue
Block a user