forked from MapComplete/MapComplete
Attempt to fix the personal layer
This commit is contained in:
parent
ebc89385ea
commit
fa5ed7c690
3 changed files with 6 additions and 1 deletions
|
@ -53,6 +53,7 @@ export default class OverpassFeatureSource implements FeatureSource {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let minzoom = Math.min(...layoutToUse.data.layers.map(layer => layer.minzoom ?? 18));
|
let minzoom = Math.min(...layoutToUse.data.layers.map(layer => layer.minzoom ?? 18));
|
||||||
|
console.debug("overpass source: minzoom is ", minzoom)
|
||||||
return location.zoom >= minzoom;
|
return location.zoom >= minzoom;
|
||||||
}, [layoutToUse]
|
}, [layoutToUse]
|
||||||
);
|
);
|
||||||
|
|
|
@ -69,6 +69,9 @@ export class ElementStorage {
|
||||||
const debug_msg = []
|
const debug_msg = []
|
||||||
let somethingChanged = false;
|
let somethingChanged = false;
|
||||||
for (const k in newProperties) {
|
for (const k in newProperties) {
|
||||||
|
if(!newProperties.hasOwnProperty(k)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const v = newProperties[k];
|
const v = newProperties[k];
|
||||||
|
|
||||||
if (keptKeys[k] !== v) {
|
if (keptKeys[k] !== v) {
|
||||||
|
|
|
@ -22,7 +22,8 @@ export default class FilteringFeatureSource implements FeatureSource {
|
||||||
|
|
||||||
const layerDict = {};
|
const layerDict = {};
|
||||||
if (layers.data.length == 0) {
|
if (layers.data.length == 0) {
|
||||||
throw "No layers defined!"
|
console.warn("No layers defined!")
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
for (const layer of layers.data) {
|
for (const layer of layers.data) {
|
||||||
layerDict[layer.layerDef.id] = layer;
|
layerDict[layer.layerDef.id] = layer;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue