mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
add crossing:markings tag when connecting crossing (#9586)
This commit is contained in:
@@ -167,6 +167,8 @@ export function validationCrossingWays(context) {
|
||||
if ((entity1IsPath || entity2IsPath) && entity1IsPath !== entity2IsPath) {
|
||||
// one feature is a path but not both
|
||||
|
||||
if (!bothLines) return {};
|
||||
|
||||
var roadFeature = entity1IsPath ? entity2 : entity1;
|
||||
var pathFeature = entity1IsPath ? entity1 : entity2;
|
||||
// don't mark path connections with tracks as crossings
|
||||
@@ -181,11 +183,15 @@ export function validationCrossingWays(context) {
|
||||
return {};
|
||||
}
|
||||
if (['marked', 'unmarked', 'traffic_signals', 'uncontrolled'].indexOf(pathFeature.tags.crossing) !== -1) {
|
||||
// if the path is a crossing, match the crossing type
|
||||
return bothLines ? { highway: 'crossing', crossing: pathFeature.tags.crossing } : {};
|
||||
// if the path is a crossing, match the crossing type and markings
|
||||
var tags = { highway: 'crossing', crossing: pathFeature.tags.crossing };
|
||||
if ('crossing:markings' in pathFeature.tags) {
|
||||
tags['crossing:markings'] = pathFeature.tags['crossing:markings'];
|
||||
}
|
||||
return tags;
|
||||
}
|
||||
// don't add a `crossing` subtag to ambiguous crossings
|
||||
return bothLines ? { highway: 'crossing' } : {};
|
||||
return { highway: 'crossing' };
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user