Use value of vehicle tag as placeholder in derived access fields

see https://github.com/openstreetmap/id-tagging-schema/issues/378
This commit is contained in:
Martin Raifer
2022-02-03 19:27:17 +01:00
parent 6a9e0997c7
commit f7d1459c97
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -47,6 +47,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
* Handle indoor features like buildings when checking for crossing ways ([#8944])
#### :rocket: Presets
* Optimize order of values in dropdowns of `access` fields ([#8945])
* Use value of `vehicle` tag as placeholder value of `access` fields for `motor_vehicle` and `bicycle`
#### :hammer: Development
* Switch build system to [esbuild](https://esbuild.github.io/) for much faster builds ([#8774], thanks [@ mbrzakovic] and [@bhousel])
+5
View File
@@ -230,6 +230,11 @@ export function uiFieldAccess(field, context) {
if (d === 'access') {
return 'yes';
}
if (d === 'bicycle' || d === 'motor_vehicle') {
if (tags.vehicle && typeof tags.vehicle === 'string') {
return tags.vehicle;
}
}
if (tags.access && typeof tags.access === 'string') {
return tags.access;
}