forked from MapComplete/MapComplete
Fix: fix UK-Addresses themes again
This commit is contained in:
parent
b2e7b7d221
commit
370b200bb3
2 changed files with 110 additions and 12 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue