Only add viewfields for an all-way stop on a highway intersection.

Sometimes people tag all-way stop signs at the junction node,
othertimes people tag all-way stop signs at the stop sign location.

What we're doing here is:
- if `stop=all` tagged at the junction, show viewfield in all directions
- if `stop=all` tagged at the sign location, show viewfield according to `direction=` tag
This commit is contained in:
Bryan Housel
2017-12-08 14:36:45 -05:00
parent 6aba27c84a
commit 515094cb56
+1 -1
View File
@@ -76,7 +76,7 @@ export function svgVertices(projection, context) {
if (entity.id in directions) return directions[entity.id];
var dir = (entity.tags['traffic_signals:direction'] || entity.tags.direction || '').toLowerCase();
var stop = (entity.tags.stop || '').toLowerCase();
var stop = ((entity.isHighwayIntersection(graph) && entity.tags.stop) || '').toLowerCase();
var goBackward = (dir === 'backward' || dir === 'both' || dir === 'all' || stop === 'all');
var goForward = (dir === 'forward' || dir === 'both' || dir === 'all' || stop === 'all');
if (!goForward && !goBackward) return;