forked from MapComplete/MapComplete
Feature: add online indicator to special renderings or hide them in case of failure
This commit is contained in:
parent
b6366412ea
commit
6f44fe31d0
7 changed files with 28 additions and 12 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue