Skip to content

Commit

Permalink
Merge remote-tracking branch 'k-yle/conveying' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrasd committed Jun 5, 2024
2 parents 99d7a85 + 180a2bb commit 94a5543
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,15 @@ _Breaking developer changes, which may affect downstream projects or sites that
#### :mortar_board: Walkthrough / Help
#### :rocket: Presets
* Render `highway=ladder` in a style similar to stairs ([#10257], thanks [@k-yle])
* Render arrows on lines with `conveying` tag ([#10255], thanks [@k-yle])
#### :hammer: Development
* Update dependencies, including `osm-community-index` to v5.7, `osm-auth` to v2.5

[#3595]: https://github.com/openstreetmap/iD/issues/3595
[#8994]: https://github.com/openstreetmap/iD/issues/8994
[#9993]: https://github.com/openstreetmap/iD/issues/9993
[#10181]: https://github.com/openstreetmap/iD/pull/10181
[#10255]: https://github.com/openstreetmap/iD/pull/10255
[#10257]: https://github.com/openstreetmap/iD/pull/10257
[@zbycz]: https://github.com/zbycz

Expand Down
5 changes: 5 additions & 0 deletions modules/osm/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ export var osmOneWayTags = {
't-bar': true,
'zip_line': true
},
'conveying': {
'forward': true,
'backward': true,
'reversible': true,
},
'highway': {
'motorway': true
},
Expand Down
13 changes: 11 additions & 2 deletions modules/svg/lines.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,18 @@ export function svgLines(projection, context) {
var onewayArr = v.filter(function(d) { return d.isOneWay(); });
var onewaySegments = svgMarkerSegments(
projection, graph, 35,
function shouldReverse(entity) { return entity.tags.oneway === '-1'; },
function shouldReverse(entity) {
return (
entity.tags.oneway === '-1'
|| entity.tags.conveying === 'backward'
);
},
function bothDirections(entity) {
return entity.tags.oneway === 'reversible' || entity.tags.oneway === 'alternating';
return (
entity.tags.oneway === 'alternating'
|| entity.tags.oneway === 'reversible'
|| entity.tags.conveying === 'reversible'
);
}
);
onewaydata[k] = utilArrayFlatten(onewayArr.map(onewaySegments));
Expand Down

0 comments on commit 94a5543

Please sign in to comment.