-
Notifications
You must be signed in to change notification settings - Fork 120
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
Conversation
'shield_text': '123456', | ||
'shield_text_length': '6', | ||
'bicycle_shield_text': '1234567', | ||
'bus_shield_text': '', |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can do
Implement *shield_text_length (as string) for all the *shield_text fields, including hgv_restrictions. Added tests for all and updated docs.