Layer filtering now allows items that would show up on another layer
This commit is contained in:
parent
2a31badd3d
commit
52f1d5511d
1 changed files with 14 additions and 1 deletions
|
@ -32,7 +32,20 @@ export default class FilteringFeatureSource implements FeatureSource {
|
|||
if (layer === undefined) {
|
||||
throw "No layer found with id " + layerId;
|
||||
}
|
||||
return layer.isDisplayed.data && (layer.layerDef.minzoom <= location.data.zoom);
|
||||
if(layer.isDisplayed.data && (layer.layerDef.minzoom <= location.data.zoom)){
|
||||
return true;
|
||||
}
|
||||
// Does it match any other layer?
|
||||
for (const toCheck of layers) {
|
||||
if(!toCheck.isDisplayed.data){
|
||||
continue;
|
||||
}
|
||||
if(toCheck.layerDef.overpassTags.matchesProperties(f.feature.properties)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
});
|
||||
self.features.setData(newFeatures);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue