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

@ -10,6 +10,7 @@ import RelationsTracker from "../Osm/RelationsTracker";
import {BBox} from "../BBox";
import Loc from "../../Models/Loc";
import LayerConfig from "../../Models/ThemeConfig/LayerConfig";
import AllKnownLayers from "../../Customizations/AllKnownLayers";
export default class OverpassFeatureSource implements FeatureSource {
@ -121,6 +122,9 @@ export default class OverpassFeatureSource implements FeatureSource {
if (typeof (layer) === "string") {
throw "A layer was not expanded!"
}
if(AllKnownLayers.priviliged_layers.indexOf(layer.id) >= 0){
continue
}
if (this.state.locationControl.data.zoom < layer.minzoom) {
continue;
}