oneway markers on rivers and streams

This commit is contained in:
Ansis Brammanis
2013-03-06 17:51:31 -05:00
parent 01fc68a07a
commit 928cade41b
3 changed files with 14 additions and 4 deletions

View File

@@ -622,6 +622,10 @@ text {
opacity: .7;
}
.oneway .textpath.tag-waterway {
fill: #002F35;
}
text.tag-oneway {
fill:#91CFFF;
stroke:#2C6B9B;

View File

@@ -33,7 +33,9 @@ _.extend(iD.Way.prototype, {
},
isOneWay: function() {
return this.tags.oneway === 'yes';
return this.tags.oneway === 'yes' ||
this.tags.waterway === 'river' ||
this.tags.waterway === 'stream';
},
isClosed: function() {

View File

@@ -105,8 +105,9 @@ iD.svg.Lines = function(projection) {
var lines = [];
for (var i = 0; i < entities.length; i++) {
var entity = entities[i], outer;
if (outer = simpleMultipolygonOuterMember(entity, graph)) {
var entity = entities[i],
outer = simpleMultipolygonOuterMember(entity, graph);
if (outer) {
lines.push(entity.mergeTags(outer.tags));
} else if (entity.geometry(graph) === 'line') {
lines.push(entity);
@@ -150,11 +151,14 @@ iD.svg.Lines = function(projection) {
.filter(filter)
.data(oneways, iD.Entity.key);
var tagClasses = iD.svg.TagClasses();
var tp = labels.enter()
.append('text')
.attr({ 'class': 'oneway', dy: 4 })
.append('textPath')
.attr('class', 'textpath');
.attr('class', 'textpath')
.call(tagClasses);
labels.exit().remove();