Add names to feature sources, fix that old, cached geometries get changed when a newer version is loaded

This commit is contained in:
Pieter Vander Vennet 2021-04-23 12:55:38 +02:00
parent 6234d26bac
commit 141d4db028
14 changed files with 60 additions and 43 deletions

View file

@ -11,6 +11,8 @@ import {TagsFilter} from "../Tags/TagsFilter";
export default class UpdateFromOverpass implements FeatureSource {
public readonly name = "UpdateFromOverpass"
/**
* The last loaded features of the geojson
*/
@ -86,7 +88,7 @@ export default class UpdateFromOverpass implements FeatureSource {
if (layer.doNotDownload) {
continue;
}
if(layer.source.geojsonSource !== undefined){
if (layer.source.geojsonSource !== undefined) {
// Not our responsibility to download this layer!
continue;
}
@ -128,8 +130,8 @@ export default class UpdateFromOverpass implements FeatureSource {
console.log("Still running a query, not updating");
return;
}
if(this.timeout.data > 0){
if (this.timeout.data > 0) {
console.log("Still in timeout - not updating")
return;
}