Fixing adding multiple points

This commit is contained in:
Pieter Vander Vennet 2021-01-04 22:59:11 +01:00
parent 32bc1433b4
commit baf41cb79d
6 changed files with 20 additions and 25 deletions

View file

@ -13,27 +13,18 @@ export default class FeatureDuplicatorPerLayer implements FeatureSource {
constructor(layers: { layerDef: LayerConfig }[], upstream: FeatureSource) {
let noPassthroughts = true;
for (const layer of layers) {
if (layer.layerDef.passAllFeatures) {
noPassthroughts = false;
break;
}
}
this.features = upstream.features.map(features => {
const newFeatures: { feature: any, freshness: Date }[] = [];
if(features === undefined){
return newFeatures;
}
for (const f of features) {
if (f.feature._matching_layer_id) {
// Already matched previously
// We simply add it
newFeatures.push(f);
return;
continue;
}