Feature: add online indicator to special renderings or hide them in case of failure

This commit is contained in:
Pieter Vander Vennet 2025-08-01 00:43:52 +02:00
parent b6366412ea
commit 6f44fe31d0
7 changed files with 28 additions and 12 deletions

View file

@ -8,7 +8,8 @@ import { Utils } from "../../../Utils"
import { TagsFilter } from "../../Tags/TagsFilter"
import { BBox } from "../../BBox"
import { OsmTags } from "../../../Models/OsmFeature"
;("use strict")
("use strict")
/**
* A wrapper around the 'Overpass'-object.
@ -106,6 +107,9 @@ export default class OverpassFeatureSource implements UpdatableFeatureSource {
* @private
*/
public async updateAsync(overrideBounds?: BBox): Promise<void> {
if (!navigator.onLine) {
return
}
let data: FeatureCollection<Geometry, OsmTags> = undefined
let lastUsed = 0
const start = new Date()