forked from MapComplete/MapComplete
Fixing adding multiple points
This commit is contained in:
parent
32bc1433b4
commit
baf41cb79d
6 changed files with 20 additions and 25 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue