forked from MapComplete/MapComplete
Add erase all option, formatting
This commit is contained in:
parent
8b2aff0244
commit
62244c02c4
5 changed files with 50 additions and 36 deletions
|
@ -77,16 +77,14 @@ export default class FeaturePipeline implements FeatureSource {
|
|||
]);
|
||||
|
||||
merged.features.syncWith(allLoadedFeatures)
|
||||
|
||||
const source =
|
||||
new WayHandlingApplyingFeatureSource(flayers,
|
||||
new FilteringFeatureSource(
|
||||
flayers,
|
||||
locationControl,
|
||||
selectedElement,
|
||||
merged
|
||||
));
|
||||
this.features = source.features;
|
||||
|
||||
this.features = new WayHandlingApplyingFeatureSource(flayers,
|
||||
new FilteringFeatureSource(
|
||||
flayers,
|
||||
locationControl,
|
||||
selectedElement,
|
||||
merged
|
||||
)).features;
|
||||
}
|
||||
|
||||
}
|
|
@ -94,9 +94,14 @@ export default class SimpleMetaTagger {
|
|||
}
|
||||
const value = feature.properties[key]
|
||||
const [, denomination] = unit.findDenomination(value)
|
||||
const canonical = denomination.canonicalValue(value)
|
||||
let canonical = denomination.canonicalValue(value) ?? undefined;
|
||||
console.log("Rewritten ", key, " from", value, "into", canonical)
|
||||
if(canonical === undefined && !unit.eraseInvalid) {
|
||||
break;
|
||||
}
|
||||
|
||||
feature.properties[key] = canonical;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue