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
|
|
@ -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