Add road height field with unit dropdowns#8075
Conversation
ad8903e to
796537d
Compare
| # maxheight=* | ||
| label: Max Height | ||
| # maxheight field placeholder | ||
| placeholder: '4, 4.5, 5, 14''0", 14''6", 15''0"' |
There was a problem hiding this comment.
This placeholder could probably be restored, but rewritten so that it only encourages the use of . as a decimal separator but doesn’t encourage putting ' and " directly in the field.
| # symbol for meters | ||
| meter: m | ||
| # abbreviation of feet | ||
| foot: ft |
There was a problem hiding this comment.
These abbreviations are already present in the YAML file, but only as part of format strings:
Line 2278 in bb56584
In theory, we could reuse those strings to decide whether to display the unit dropdown to the left or right of the input box, but I don’t know if any language needs that extra complexity.
|
Regarding #7129 (comment), I think we could generalize this field to cover the other length fields (Height, Length, Width, and Elevation). However, if we ever add fields for |
Add `roadheight` field type for openstreetmap/iD#8075 Add `locationSet` info to the readme
|
The new maxheight field type would be useful for openstreetmap/id-tagging-schema#232 as well. |
000f0ad to
cdb6317
Compare
cdb6317 to
39fe87a
Compare
Implemented the
roadheightfield type based on theroadspeedfield type. The new field has an explicit option to choose the unit of measurement (between meters and feet). When the field is set to feet, an additional input box lights up to allow the user to enter inches separately.Initial state in Vietnam:

maxheight=4.8:Initial state in the U.S.:

maxheight=12':maxheight=12'6":maxheight=36":maxheight=below_default:Multiple selection:

Fixes #3614. Depends on rapideditor/country-coder#30.