diff --git a/js/id/core/way.js b/js/id/core/way.js index eb62667ac..34ac0339f 100644 --- a/js/id/core/way.js +++ b/js/id/core/way.js @@ -34,6 +34,8 @@ _.extend(iD.Way.prototype, { isOneWay: function() { return this.tags.oneway === 'yes' || + this.tags.oneway === '1' || + this.tags.oneway === '-1' || this.tags.waterway === 'river' || this.tags.waterway === 'stream' || this.tags.junction === 'roundabout'; diff --git a/js/id/svg.js b/js/id/svg.js index f44b53dc0..004fb4927 100644 --- a/js/id/svg.js +++ b/js/id/svg.js @@ -29,13 +29,16 @@ iD.svg = { b, i = 0, offset = dt, - segments = []; + segments = [], + coordinates = graph.childNodes(entity).map(function(n) { + return n.loc; + }); + + if (entity.tags.oneway === '-1') coordinates.reverse(); d3.geo.stream({ type: 'LineString', - coordinates: graph.childNodes(entity).map(function(n) { - return n.loc; - }) + coordinates: coordinates }, projection.stream({ lineStart: function() {}, lineEnd: function() {},