Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

South Korea shields #217

Merged
merged 3 commits into from
Mar 12, 2022
Merged

South Korea shields #217

merged 3 commits into from
Mar 12, 2022

Conversation

1ec5
Copy link
Collaborator

@1ec5 1ec5 commented Mar 10, 2022

Added shields for national expressways, national highways, and local highways in South Korea.

Bongdam

The national expressway shield is a little slice of home away from home. The shape is based on this sign blank on Wikimedia Commons, which is in the public domain. It’s very similar to the U.S. route shield, but the contours have subtle differences. It doesn’t leave very much room for the numerals, so ironically, local highways are much more prominent than national expressways.

The national highway shield is supposed to be an oval, even when a two-digit number would fit inside a circle, so I eschewed the roundedRectShield() function in favor of a custom image. Unfortunately, spritezero turns the ellipse into a hendecagon.

I’m unable to implement shields for metropolitan city roads and expressways. They are mapped as route relations, but the relations aren’t tagged with network. Instead, they’ve been added to network relations representing the highway system or the municipal government. We need them to be tagged with network=KR:* like the other route types so we can support them properly. The refs for Seoul’s special metropolitan city roads include both the signposted number and the non-signposted official number, which should go in unsigned_ref.

Along the way, this PR fixes an issue that caused routes with matching networks but missing refs to appear as blank shields.

Fixes #138.

@1ec5
Copy link
Collaborator Author

1ec5 commented Mar 10, 2022

The national highway shield is supposed to be an oval, even when a two-digit number would fit inside a circle, so I eschewed the roundedRectShield() function in favor of a custom image. Unfortunately, spritezero turns the ellipse into a hendecagon.

Somehow I overlooked the circleShield() function. I added some options to specify the text color and fix the width, since the shield should always look like an oval:

Bongdam

@ZeLonewolf
Copy link
Owner

Because this PR uses a scaling variable, needs to be tested on 1x and 2x+ DPRs to ensure no scaling issues.

@1ec5
Copy link
Collaborator Author

1ec5 commented Mar 10, 2022

1× simulation in Firefox:

1×

@ZeLonewolf

This comment was marked as resolved.

@1ec5

This comment was marked as resolved.

@1ec5 1ec5 requested a review from ZeLonewolf March 12, 2022 07:54
Copy link
Owner

@ZeLonewolf ZeLonewolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for fixing that blank shield bug. Also confirmed that the Pittsburgh shields still work as expected.

@1ec5 1ec5 merged commit 3f84e35 into main Mar 12, 2022
@1ec5 1ec5 deleted the 1ec5-kr branch March 12, 2022 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamically drawn shields should not be drawn without ref
2 participants