Use IndexedDb to store cached geodata, fix #494. This should prevent crashes

This commit is contained in:
Pieter Vander Vennet 2021-11-16 02:57:26 +01:00
parent 8fa7de661e
commit 9c848cfaee
7 changed files with 94 additions and 147 deletions

View file

@ -218,7 +218,6 @@ export default class MapState extends UserRelatedState {
let timeDiff = Number.MAX_VALUE // in seconds
const olderLocation = features.data[features.data.length - 2]
if (olderLocation !== undefined) {
console.log("Previous location", previousLocation)
timeDiff = (new Date(previousLocation.freshness).getTime() - new Date(olderLocation.freshness).getTime()) / 1000
}
if (d < 20 && timeDiff < 60) {