From 7aa97c9a9955efc345b2d7bbf2509d7a2f6d67d4 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sat, 21 Jun 2025 00:27:52 +0200 Subject: [PATCH] Chore: remove maptiler mentions --- android | 2 +- src/Models/Constants.ts | 1 - src/Models/MapProperties.ts | 1 - src/UI/Map/MapLibreAdaptor.ts | 33 --------------------------------- theme.html | 2 -- 5 files changed, 1 insertion(+), 38 deletions(-) diff --git a/android b/android index bdd43dc65..1d442585b 160000 --- a/android +++ b/android @@ -1 +1 @@ -Subproject commit bdd43dc65c3e1c5c5b12bc60af30e909df7dd95b +Subproject commit 1d442585b5202fcb4424d41fa2597cc23f0a9b65 diff --git a/src/Models/Constants.ts b/src/Models/Constants.ts index e1c38552a..adab8b890 100644 --- a/src/Models/Constants.ts +++ b/src/Models/Constants.ts @@ -211,7 +211,6 @@ export default class Constants { public static GeoIpServer: string | undefined = Constants.config.geoip_server public static ErrorReportServer: string | undefined = Constants.config.error_server - public static readonly maptilerApiKey = "GvoVAJgu46I5rZapJuAy" public static readonly SummaryServer: string = Constants.config.summary_server public static allServers: string[] = [ diff --git a/src/Models/MapProperties.ts b/src/Models/MapProperties.ts index eb3876474..b5a3f1974 100644 --- a/src/Models/MapProperties.ts +++ b/src/Models/MapProperties.ts @@ -29,7 +29,6 @@ export interface MapProperties { nearestFeature?: Feature }> readonly allowZooming: UIEventSource - readonly useTerrain: Store readonly showScale: UIEventSource /** diff --git a/src/UI/Map/MapLibreAdaptor.ts b/src/UI/Map/MapLibreAdaptor.ts index bed4cc0e9..644309b6e 100644 --- a/src/UI/Map/MapLibreAdaptor.ts +++ b/src/UI/Map/MapLibreAdaptor.ts @@ -57,7 +57,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap { readonly maxzoom: UIEventSource readonly rotation: UIEventSource readonly pitch: UIEventSource - readonly useTerrain: Store readonly showScale: UIEventSource private static pmtilesInited = false @@ -107,7 +106,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap { this.bounds = state?.bounds ?? new UIEventSource(undefined) this.rotation = state?.rotation ?? new UIEventSource(0) this.pitch = state?.pitch ?? new UIEventSource(0) - this.useTerrain = state?.useTerrain ?? new ImmutableStore(false) this.rasterLayer = state?.rasterLayer ?? new UIEventSource(undefined) this.showScale = state?.showScale ?? new UIEventSource(false) @@ -182,7 +180,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap { this.setBounds(this.bounds.data) this.SetRotation(this.rotation.data) this.setScale(this.showScale.data) - this.setTerrain(this.useTerrain.data) this.updateStores(true) } @@ -265,7 +262,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap { ) this.allowZooming.addCallbackAndRun((allowZooming) => this.setAllowZooming(allowZooming)) this.bounds.addCallbackAndRunD((bounds) => this.setBounds(bounds)) - this.useTerrain?.addCallbackAndRun((useTerrain) => this.setTerrain(useTerrain)) this.showScale?.addCallbackAndRun((showScale) => this.setScale(showScale)) } @@ -718,35 +714,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap { this.zoom.setData(1) } - private async setTerrain(useTerrain: boolean) { - const map = this._maplibreMap.data - if (!map) { - return - } - const id = "maptiler-terrain-data" - if (useTerrain) { - if (map.getTerrain()) { - return - } - map.addSource(id, { - type: "raster-dem", - url: - "https://api.maptiler.com/tiles/terrain-rgb/tiles.json?key=" + - Constants.maptilerApiKey, - }) - try { - while (!map?.isStyleLoaded()) { - await Utils.waitFor(250) - } - map.setTerrain({ - source: id, - }) - } catch (e) { - console.error(e) - } - } - } - private scaleControl: maplibregl.ScaleControl = undefined private setScale(showScale: boolean) { diff --git a/theme.html b/theme.html index 108df7ef7..8d4fbce2f 100644 --- a/theme.html +++ b/theme.html @@ -16,8 +16,6 @@ - -