Skip to content
New issue

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

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

Already on GitHub? # to your account

Add shield text length fields #1991

Merged
merged 9 commits into from
Nov 10, 2021
Merged

Conversation

tgrigsby-sc
Copy link
Contributor

@tgrigsby-sc tgrigsby-sc commented Nov 10, 2021

Implement *shield_text_length (as string) for all the *shield_text fields, including hgv_restrictions. Added tests for all and updated docs.

  • Update tests
  • Update docs

@tgrigsby-sc tgrigsby-sc requested a review from nvkelso November 10, 2021 01:20
'shield_text': '123456',
'shield_text_length': '6',
'bicycle_shield_text': '1234567',
'bus_shield_text': '',
Copy link
Member

Choose a reason for hiding this comment

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

Why is 'bus_shield_text' an empty string here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because we're testing the case where we don't show a length when the shield text is empty. That was one of the requirements we discussed yesterday - if len < 0 or len > 6 we don't include the length field

docs/layers.md Outdated
@@ -1498,6 +1502,7 @@ To improve performance, some road segments are merged at low and mid-zooms. To f
* `hgv_restriction`: optional property indicating limitations to heavy goods vehicle truck access. See below for list of values. Available on both point and line geometries. See also `hgv_restriction_shield_text`.
* `hgv_time_restrictions` - optional property specifying when heavy goods vehicle truck access is restricted. See the `hgv_time_restrictions` values list below.
* `hgv_restriction_shield_text`: optional and paired with `hgv_restriction` points with values like `5.1m`. Because the units are different per restriction an abbreviation should be provided. Values in meters can be specified with one decimal precision but value of 5.0m should be given as 5m.
* `hgv_restriction_shield_text_length`: optional. Returns length of `hgv_restriction_shield_text` as a string. Missing if `hgv_restriction_field_text` is !(0 < length < 7) or field doesn't exist
Copy link
Member

Choose a reason for hiding this comment

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

Nit, the Missing if... text should be replicated to all the other documentation changes, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can do

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants