mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 23:44:47 +02:00
add default implied access values for ways with "motorroad=yes"
see https://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Access_restrictions addresses https://github.com/openstreetmap/id-tagging-schema/issues/609
This commit is contained in:
@@ -312,12 +312,19 @@ export function uiFieldAccess(field, context) {
|
||||
if (tags[accessField]) {
|
||||
return tags[accessField];
|
||||
}
|
||||
// implied access
|
||||
// motorroad: https://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Access_restrictions
|
||||
if (tags.motorroad === 'yes' && (accessField === 'foot' || accessField === 'bicycle' || accessField === 'horse')) {
|
||||
return 'no';
|
||||
}
|
||||
// inherited access
|
||||
if (tags.vehicle && (accessField === 'bicycle' || accessField === 'motor_vehicle')) {
|
||||
return tags.vehicle;
|
||||
}
|
||||
if (tags.access) {
|
||||
return tags.access;
|
||||
}
|
||||
// default access by road/barrier type
|
||||
for (const key in placeholdersByTag) {
|
||||
if (tags[key]) {
|
||||
if (placeholdersByTag[key][tags[key]] &&
|
||||
|
||||
Reference in New Issue
Block a user