Imply access=no for highway=construction objects, closes #9102

This commit is contained in:
Martin Raifer
2022-05-24 14:39:02 +02:00
parent 2ca52e75ce
commit 5810b61d5c
2 changed files with 8 additions and 3 deletions
+2
View File
@@ -57,6 +57,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
* Render `golf` features `tee`, `fairway`, `rough` and `green` in green color and using a grass pattern ([#8927])
* Tweak preset-matching to penalize non-searchable presets when matching OSM objects to presets
* Do not overwrite existing `*=no` tags by a preset's `addTags`
* Imply `access=no` in access field of `highway=construction` objects ([#9102])
#### Other
* Redact more API tokens from custom imagery sources in changeset metadata tags ([#8976], thanks [@k-yle])
#### :hammer: Development
@@ -74,6 +75,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
[#8976]: https://github.com/openstreetmap/iD/issues/8976
[#8985]: https://github.com/openstreetmap/iD/issues/8985
[#9021]: https://github.com/openstreetmap/iD/pull/9021
[#9102]: https://github.com/openstreetmap/iD/issues/9102
# 2.20.4
+6 -3
View File
@@ -207,6 +207,9 @@ export function uiFieldAccess(field, context) {
motor_vehicle: 'yes',
bicycle: 'yes',
horse: 'yes'
},
construction: {
access: 'no'
}
};
@@ -227,9 +230,6 @@ export function uiFieldAccess(field, context) {
if (tags[d] && Array.isArray(tags[d])) {
return t('inspector.multiple_values');
}
if (d === 'access') {
return 'yes';
}
if (d === 'bicycle' || d === 'motor_vehicle') {
if (tags.vehicle && typeof tags.vehicle === 'string') {
return tags.vehicle;
@@ -257,6 +257,9 @@ export function uiFieldAccess(field, context) {
}
}
}
if (d === 'access') {
return 'yes';
}
return field.placeholder();
});
};