chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2024-11-14 02:21:10 +01:00
parent 47281a8d6c
commit 3fd14e82a0
84 changed files with 2093 additions and 1450 deletions

View file

@ -49,7 +49,7 @@ export default class OverpassFeatureSource implements UpdatableFeatureSource {
},
options?: {
padToTiles?: Store<number>
isActive?: Store<boolean>,
isActive?: Store<boolean>
ignoreZoom?: boolean
}
) {
@ -57,7 +57,9 @@ export default class OverpassFeatureSource implements UpdatableFeatureSource {
this._isActive = options?.isActive ?? new ImmutableStore(true)
this.padToZoomLevel = options?.padToTiles
const self = this
this._layersToDownload = options?.ignoreZoom? new ImmutableStore(state.layers) : state.zoom.map((zoom) => this.layersToDownload(zoom))
this._layersToDownload = options?.ignoreZoom
? new ImmutableStore(state.layers)
: state.zoom.map((zoom) => this.layersToDownload(zoom))
state.bounds.mapD(
(_) => {
@ -123,9 +125,11 @@ export default class OverpassFeatureSource implements UpdatableFeatureSource {
let bounds: BBox
do {
try {
bounds = overrideBounds ?? this.state.bounds.data
?.pad(this.state.widenFactor)
?.expandToTileBounds(this.padToZoomLevel?.data)
bounds =
overrideBounds ??
this.state.bounds.data
?.pad(this.state.widenFactor)
?.expandToTileBounds(this.padToZoomLevel?.data)
if (!bounds) {
return
}