added support for oneway=1 and oneway=-1

fixes #1400
This commit is contained in:
Ansis Brammanis
2013-05-01 11:10:02 -04:00
parent 823d28339c
commit 5ded5fca4e
2 changed files with 9 additions and 4 deletions
+2
View File
@@ -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';
+7 -4
View File
@@ -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() {},