Fix bug: fallthrough layers let their features pass again, fixes #349

This commit is contained in:
Pieter Vander Vennet 2021-06-10 16:55:08 +02:00
parent 061abd4a76
commit 3d40378628
3 changed files with 5 additions and 5 deletions

View file

@ -20,9 +20,9 @@ export default class RememberingSource implements FeatureSource {
}
// Then new ids
const ids = new Set<string>(features.map(f => f.feature.properties.id + f.feature.geometry.type));
const ids = new Set<string>(features.map(f => f.feature.properties.id + f.feature.geometry.type + f.feature._matching_layer_id));
// the old data
const oldData = oldFeatures.filter(old => !ids.has(old.feature.properties.id + old.feature.geometry.type))
const oldData = oldFeatures.filter(old => !ids.has(old.feature.properties.id + old.feature.geometry.type + old.feature._matching_layer_id))
return [...features, ...oldData];
})
}