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