Merge remote-tracking branch 'faebebin/fix/9176-connect-features-crossing-with-pedestrian-signals' into develop

This commit is contained in:
Martin Raifer
2022-07-19 16:38:18 +02:00
3 changed files with 14 additions and 2 deletions
+2
View File
@@ -48,6 +48,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
#### :sparkles: Usability & Accessibility
* Always render `ref` tag as label ([#9054], thanks [@k-yle])
* Remember last map location when no location is externally specified ([#7790], thanks [@bvercelli99])
* Add a `crossing=traffic_signals` tag to the intersection node when using _connect features_ of a _crossing with pedestrian signals_ way in the validator ([#9176], thanks [@faebebin])
#### :bug: Bugfixes
* When typing an invalid unit into the Speed Limit or Max Height field, revert to the previous unit ([#9110], thanks [@1ec5])
* Fix wikidata field displaying `[object Object]` instead of item labels after wikibase API change ([#9067])
@@ -96,6 +97,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
[@paulklie]: https://github.com/paulklie
[@renancleyson-dev]: https://github.com/renancleyson-dev
[@bvercelli99]: https://github.com/bvercelli99
[@faebebin]:_https://github.com/faebebin
# 2.21.1
+1 -1
View File
@@ -146,7 +146,7 @@ export function validationCrossingWays(context) {
return {};
}
var pathFeature = entity1IsPath ? entity1 : entity2;
if (['marked', 'unmarked'].indexOf(pathFeature.tags.crossing) !== -1) {
if (['marked', 'unmarked', 'traffic_signals'].indexOf(pathFeature.tags.crossing) !== -1) {
// if the path is a crossing, match the crossing type
return bothLines ? { highway: 'crossing', crossing: pathFeature.tags.crossing } : {};
}
+11 -1
View File
@@ -213,11 +213,21 @@ describe('iD.validations.crossing_ways', function () {
verifySingleCrossingIssue(validate(), { highway: 'crossing' });
});
it('flags road crossing crosswalk', function() {
it('flags road crossing marked crosswalk', function() {
createWaysWithOneCrossingPoint({ highway: 'residential' }, { highway: 'footway', crossing: 'marked' });
verifySingleCrossingIssue(validate(), { highway: 'crossing', crossing: 'marked' });
});
it('flags road crossing crosswalk with traffic_signals', function() {
createWaysWithOneCrossingPoint({ highway: 'residential' }, { highway: 'footway', crossing: 'traffic_signals' });
verifySingleCrossingIssue(validate(), { highway: 'crossing', crossing: 'traffic_signals' });
});
it('flags road crossing unmarked crosswalk', function() {
createWaysWithOneCrossingPoint({ highway: 'residential' }, { highway: 'footway', crossing: 'unmarked' });
verifySingleCrossingIssue(validate(), { highway: 'crossing', crossing: 'unmarked' });
});
it('flags road=track crossing footway', function() {
createWaysWithOneCrossingPoint({ highway: 'track' }, { highway: 'footway' });
verifySingleCrossingIssue(validate(), {});