Chore: small cleanups

This commit is contained in:
Pieter Vander Vennet 2024-10-08 13:18:19 +02:00
parent c2f7b1e8c1
commit b30cb57615

View file

@ -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