speed up POI retrieval by custom overpass api url (#596)
* speed up POI retrieval by custom overpass api url * consistent overpass api url default * switches default to overpass-api.de --------- Co-authored-by: Christian Beutel <>
This commit is contained in:
@@ -64,6 +64,7 @@ services:
|
|||||||
UPLOAD_FOLDER: /app/uploads
|
UPLOAD_FOLDER: /app/uploads
|
||||||
UPLOAD_USER:
|
UPLOAD_USER:
|
||||||
UPLOAD_PASSWORD:
|
UPLOAD_PASSWORD:
|
||||||
|
PUBLIC_OVERPASS_API_URL: https://overpass-api.de
|
||||||
PUBLIC_VALHALLA_URL: https://valhalla1.openstreetmap.de
|
PUBLIC_VALHALLA_URL: https://valhalla1.openstreetmap.de
|
||||||
PUBLIC_NOMINATIM_URL: https://nominatim.openstreetmap.org
|
PUBLIC_NOMINATIM_URL: https://nominatim.openstreetmap.org
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -48,3 +48,4 @@ Since we use an unmodified installation of meilisearch you can use all variables
|
|||||||
| UPLOAD_FOLDER | Folder from which <span class="-tracking-[0.075em]">wanderer</span> auto-uploads trails | /app/uploads |
|
| UPLOAD_FOLDER | Folder from which <span class="-tracking-[0.075em]">wanderer</span> auto-uploads trails | /app/uploads |
|
||||||
| UPLOAD_USER | Username for the account with which <span class="-tracking-[0.075em]">wanderer</span> auto-uploads trails | |
|
| UPLOAD_USER | Username for the account with which <span class="-tracking-[0.075em]">wanderer</span> auto-uploads trails | |
|
||||||
| UPLOAD_PASSWORD | Password for the account with which <span class="-tracking-[0.075em]">wanderer</span> auto-uploads trails | |
|
| UPLOAD_PASSWORD | Password for the account with which <span class="-tracking-[0.075em]">wanderer</span> auto-uploads trails | |
|
||||||
|
| PUBLIC_OVERPASS_API_URL | Overpass API URL used for map points of interest | https://overpass-api.de |
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ services:
|
|||||||
UPLOAD_FOLDER: /app/uploads
|
UPLOAD_FOLDER: /app/uploads
|
||||||
UPLOAD_USER:
|
UPLOAD_USER:
|
||||||
UPLOAD_PASSWORD:
|
UPLOAD_PASSWORD:
|
||||||
|
PUBLIC_OVERPASS_API_URL: https://overpass-api.de
|
||||||
PUBLIC_VALHALLA_URL: https://valhalla1.openstreetmap.de
|
PUBLIC_VALHALLA_URL: https://valhalla1.openstreetmap.de
|
||||||
PUBLIC_NOMINATIM_URL: https://nominatim.openstreetmap.org
|
PUBLIC_NOMINATIM_URL: https://nominatim.openstreetmap.org
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -16,5 +16,6 @@ ENV MEILI_URL=http://127.0.0.1:7700
|
|||||||
ENV PUBLIC_DISABLE_SIGNUP=false
|
ENV PUBLIC_DISABLE_SIGNUP=false
|
||||||
ENV UPLOAD_USER=
|
ENV UPLOAD_USER=
|
||||||
ENV UPLOAD_PASSWORD=
|
ENV UPLOAD_PASSWORD=
|
||||||
|
ENV PUBLIC_OVERPASS_API_URL=
|
||||||
|
|
||||||
CMD crond && node build
|
CMD crond && node build
|
||||||
@@ -9,9 +9,10 @@ import * as M from "maplibre-gl";
|
|||||||
import { type LngLatBounds, type MapMouseEvent, type StyleSpecification } from "maplibre-gl";
|
import { type LngLatBounds, type MapMouseEvent, type StyleSpecification } from "maplibre-gl";
|
||||||
import { pois, type BaseLayer, type MapState } from "./layers";
|
import { pois, type BaseLayer, type MapState } from "./layers";
|
||||||
import type { OverpassResponse } from "./types";
|
import type { OverpassResponse } from "./types";
|
||||||
|
import { env } from '$env/dynamic/public'
|
||||||
|
|
||||||
export class OverpassLayer implements BaseLayer {
|
export class OverpassLayer implements BaseLayer {
|
||||||
private overpassApiURL: string = "https://overpass.private.coffee/api/interpreter"
|
private overpassApiURL: string = (env.PUBLIC_OVERPASS_API_URL && env.PUBLIC_OVERPASS_API_URL.length > 0 ? env.PUBLIC_OVERPASS_API_URL : "https://overpass-api.de") + "/api/interpreter";
|
||||||
|
|
||||||
data: GeoJSON.FeatureCollection = ({ type: 'FeatureCollection', features: [] });
|
data: GeoJSON.FeatureCollection = ({ type: 'FeatureCollection', features: [] });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user