Chore: housekeeping

This commit is contained in:
Pieter Vander Vennet 2024-06-20 04:21:29 +02:00
parent 8178c5607b
commit cd0d275965
73 changed files with 2105 additions and 2219 deletions

View file

@ -97,10 +97,10 @@ class SingleBackgroundHandler {
}
}
private tryEnableSafe(): boolean{
private tryEnableSafe(): boolean {
try {
return this.tryEnable()
}catch (e) {
} catch (e) {
console.log("Error: could not enable due to error", e)
return false
}
@ -119,11 +119,7 @@ class SingleBackgroundHandler {
console.debug("Enabling", background.id)
let addLayerBeforeId = "transit_pier" // this is the first non-landuse item in the stylesheet, we add the raster layer before the roads but above the landuse
if (!map.getLayer(addLayerBeforeId)) {
console.warn(
"Layer",
addLayerBeforeId,
"not found"
)
console.warn("Layer", addLayerBeforeId, "not found")
addLayerBeforeId = undefined
}
if (background.category === "osmbasedmap" || background.category === "map") {