Fix: fix UK-Addresses themes again

This commit is contained in:
Pieter Vander Vennet 2023-11-12 15:26:08 +01:00
parent b2e7b7d221
commit 370b200bb3
2 changed files with 110 additions and 12 deletions

View file

@ -45,11 +45,15 @@ export default class ShowOverlayRasterLayer {
let zoom = this._mapProperties?.zoom?.data
let withinRange = zoom === undefined || zoom > this._layer.min_zoom
let isDisplayed = (this._isDisplayed?.data ?? true) && withinRange
this._map.data?.setLayoutProperty(
this._layer.id,
"visibility",
isDisplayed ? "visible" : "none"
)
try {
this._map.data?.setLayoutProperty(
this._layer.id,
"visibility",
isDisplayed ? "visible" : "none"
)
} catch (e) {
console.error(e)
}
}
private async awaitStyleIsLoaded(): Promise<void> {