From b30cb5761557bd014742513487e1188e90798d84 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 8 Oct 2024 13:18:19 +0200 Subject: [PATCH] Chore: small cleanups --- src/UI/Map/RasterLayerHandler.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/UI/Map/RasterLayerHandler.ts b/src/UI/Map/RasterLayerHandler.ts index 2a2108d1e..a69f1494c 100644 --- a/src/UI/Map/RasterLayerHandler.ts +++ b/src/UI/Map/RasterLayerHandler.ts @@ -1,6 +1,6 @@ import { Map as MLMap, RasterSourceSpecification, VectorTileSource } from "maplibre-gl" import { Store, Stores, UIEventSource } from "../../Logic/UIEventSource" -import { AvailableRasterLayers, RasterLayerPolygon } from "../../Models/RasterLayers" +import { RasterLayerPolygon } from "../../Models/RasterLayers" import { RasterLayerProperties } from "../../Models/RasterLayerProperties" import { Utils } from "../../Utils" import { VectorSourceSpecification } from "@maplibre/maplibre-gl-style-spec" @@ -88,7 +88,7 @@ class SingleBackgroundHandler { return } while (!map?.isStyleLoaded()) { - await Utils.waitFor(250) + await Utils.waitFor(100) } } @@ -101,15 +101,6 @@ class SingleBackgroundHandler { } } - private tryEnableSafe(): boolean { - try { - return this.tryEnable() - } catch (e) { - console.log("Error: could not enable due to error", e) - return false - } - } - /** * Returns 'false' if should be attempted again * @private