Show blue contraflow arrow for oneway:bicycle=no on one-way ways#954
Open
tordans wants to merge 1 commit into
Open
Show blue contraflow arrow for oneway:bicycle=no on one-way ways#954tordans wants to merge 1 commit into
oneway:bicycle=no on one-way ways#954tordans wants to merge 1 commit into
Conversation
When a way is one-way for motor traffic but tagged oneway:bicycle=no, draw the existing black chevron for the general direction plus a second blue chevron in the opposite direction, offset perpendicular to the way so both arrows remain readable. https: //wiki.openstreetmap.org/wiki/Key:oneway:bicycle Increase gap between motor and bicycle chevrons to one icon width Longitudinal offset is now 3× chevron length (motor body + gap + bicycle tip placement) so < > pairs no longer overlap. Co-Authored-By: Tobias <t@tobiasjordans.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On one-way streets that allow contraflow cycling (
oneway=yes+oneway:bicycle=no, oroneway=-1with the same bicycle tag), Go Map!! today shows only a single black chevron for the general (motor) direction. Mappers cannot see at a glance that cyclists may legally travel the opposite way without opening the POI editor.This is a common tagging pattern on urban cycle infrastructure (one-way street with contraflow cycling). We want the map to communicate “cars this way, bikes both ways” directly on the canvas.
Implementation notes (Cursor)
oneway:bicycle(documented in code aboveallowsBicycleContraflow()).OsmWay.allowsBicycleContraflow()— returnstruewhenisOneWay != .NONEandtags["oneway:bicycle"] == "no". Does not changecomputeIsOneWay()/ turn-restriction logic.EditorMapLayerintomakeOneWayArrowLayer(at:direction:chevronLength:alongWayOffset:fillColor:zPosition:).<then>on the same centerline; longitudinal offset3×chevron length so the pair does not overlap). Black is drawn on top of blue.invoke(alongScreenClippedWay:offset:interval:)spacing as today (offset 50, interval 100).Out of scope (follow-up): other mode-specific exceptions (
oneway:foot,oneway:bus, …).Testing notes (@tordans)
oneway=yesandoneway:bicycle=nolike https://www.openstreetmap.org/way/25509293 — expect tandem<(blue)>(black) on the same line along the way (not offset above/below the road).Same tags with– did not test, assumed correctoneway=-1— black points backward; blue forward, still inline behind black along the way.oneway=yeswithoutoneway:bicycle=no— only the black chevron (no regression).– did not test, assumed correctoneway:bicycle=noon a non-one-way way — no arrows (unless highlighted by selection)bicycle-oneway--after.min.mov
bicycle-oneway--after.min.mov