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:
slothful-vassal
2025-10-04 14:46:52 +02:00
committed by GitHub
parent 23dd744b28
commit 44bb49ec96
5 changed files with 6 additions and 1 deletions

View File

@@ -9,9 +9,10 @@ import * as M from "maplibre-gl";
import { type LngLatBounds, type MapMouseEvent, type StyleSpecification } from "maplibre-gl";
import { pois, type BaseLayer, type MapState } from "./layers";
import type { OverpassResponse } from "./types";
import { env } from '$env/dynamic/public'
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: [] });