mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 13:38:26 +02:00
highway=motorway_link no longer implies oneway=yes
(closes #4727) iD still explicitly set the tag, and default it to `oneway=yes`
This commit is contained in:
@@ -7214,7 +7214,7 @@
|
||||
"fields": [
|
||||
"name",
|
||||
"ref_road_number",
|
||||
"oneway_yes",
|
||||
"oneway",
|
||||
"maxspeed",
|
||||
"lanes",
|
||||
"surface",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"fields": [
|
||||
"name",
|
||||
"ref_road_number",
|
||||
"oneway_yes",
|
||||
"oneway",
|
||||
"maxspeed",
|
||||
"lanes",
|
||||
"surface",
|
||||
@@ -25,6 +25,10 @@
|
||||
"highway": "motorway_link",
|
||||
"oneway": "yes"
|
||||
},
|
||||
"terms": ["ramp", "on ramp", "off ramp"],
|
||||
"terms": [
|
||||
"ramp",
|
||||
"on ramp",
|
||||
"off ramp"
|
||||
],
|
||||
"name": "Motorway Link"
|
||||
}
|
||||
|
||||
+1
-2
@@ -20,8 +20,7 @@ export var osmOneWayTags = {
|
||||
'yes': true
|
||||
},
|
||||
'highway': {
|
||||
'motorway': true,
|
||||
'motorway_link': true
|
||||
'motorway': true
|
||||
},
|
||||
'junction': {
|
||||
'circular': true,
|
||||
|
||||
@@ -16,18 +16,17 @@ describe('iD.Lanes', function() {
|
||||
.to.eql(4);
|
||||
});
|
||||
|
||||
it('returns 1 lane for highway=motorway_link', function() {
|
||||
it('returns 2 lanes for highway=motorway_link', function() {
|
||||
expect(iD.Way({tags: { highway: 'motorway_link' }}).lanes().metadata.count, 'motorway_link lanes')
|
||||
.to.eql(1);
|
||||
expect(iD.Way({tags: { highway: 'motorway_link', oneway: 'yes' }}).lanes().metadata.count, 'motorway_link lanes')
|
||||
.to.eql(1);
|
||||
});
|
||||
|
||||
it('returns 2 lanes for highway=motorway_link and oneway=no', function() {
|
||||
.to.eql(2);
|
||||
expect(iD.Way({tags: { highway: 'motorway_link', oneway: 'no' }}).lanes().metadata.count, 'motorway_link lanes')
|
||||
.to.eql(2);
|
||||
});
|
||||
|
||||
it('returns 1 lane for highway=motorway_link and oneway=yes', function() {
|
||||
expect(iD.Way({tags: { highway: 'motorway_link', oneway: 'yes' }}).lanes().metadata.count, 'motorway_link lanes')
|
||||
.to.eql(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('trunk', function() {
|
||||
|
||||
@@ -309,12 +309,12 @@ describe('iD.osmWay', function() {
|
||||
expect(iD.Way({tags: { waterway: 'river' }}).isOneWay(), 'river').to.be.true;
|
||||
expect(iD.Way({tags: { waterway: 'stream' }}).isOneWay(), 'stream').to.be.true;
|
||||
expect(iD.Way({tags: { highway: 'motorway' }}).isOneWay(), 'motorway').to.be.true;
|
||||
expect(iD.Way({tags: { highway: 'motorway_link' }}).isOneWay(), 'motorway_link').to.be.true;
|
||||
expect(iD.Way({tags: { junction: 'roundabout' }}).isOneWay(), 'roundabout').to.be.true;
|
||||
expect(iD.Way({tags: { junction: 'circular' }}).isOneWay(), 'circular').to.be.true;
|
||||
});
|
||||
|
||||
it('returns false when the way does not have implied oneway tag', function() {
|
||||
expect(iD.Way({tags: { highway: 'motorway_link' }}).isOneWay(), 'motorway_link').to.be.false;
|
||||
expect(iD.Way({tags: { highway: 'trunk' }}).isOneWay(), 'trunk').to.be.false;
|
||||
expect(iD.Way({tags: { highway: 'trunk_link' }}).isOneWay(), 'trunk_link').to.be.false;
|
||||
expect(iD.Way({tags: { highway: 'primary' }}).isOneWay(), 'primary').to.be.false;
|
||||
|
||||
Reference in New Issue
Block a user