You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-2Lines changed: 31 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -473,8 +473,7 @@ A string specifying the UI and behavior of the field. Must be one of the followi
473
473
474
474
*`access` - Block of dropdowns for defining the `access=*` tags on a highway
475
475
*`address` - Block of text and dropdown fields for entering address information (localized for editing location)
476
-
*`roadspeed` - Numeric text field for speed and dropdown for "mph" / "km/h", defaulting to the speed unit used for roads in the feature's region
477
-
*`roadheight` - Numeric text field for height and dropdowns for "m" / "ft" and "in", defaulting to the height unit used for roads in the feature's region
476
+
*`measurement` - Numeric text field with associated unit of measurement, such as inches or kilometers-per-hour. The field may have multiple units. See [#measurement](#measurement) for details.
478
477
*`restrictions` - Graphical field for editing turn restrictions
479
478
*`wikidata` - Search field for selecting a Wikidata entity
480
479
*`wikipedia` - Block of fields for selecting a wiki language and Wikipedia page
@@ -740,6 +739,36 @@ Combo field types can accept key-label pairs in the `options` value of the `stri
740
739
741
740
An optional property to reference to the icons of another field, indicated by using that field's name contained in brackets, like `{field}`. This is for example useful when there are multiple variants of fields for the same tag, which should all use the same icons.
742
741
742
+
##### `measurement`
743
+
744
+
Used when `type = measurement`. Defines the unit of measurements that are supported by this field. For example:
745
+
746
+
```json
747
+
{
748
+
"key": "diameter",
749
+
"type": "measurement",
750
+
"measurement": {
751
+
// The dimension being measured. This constrains the permitted units.
752
+
// The ID id defined by CLDR.
753
+
"dimension": "length",
754
+
755
+
"units": {
756
+
// The key defines the ID of the of the unit, as defined by CLDR.
757
+
// The values define the suffix used in the OSM tag value.
758
+
// If there are multiple values in the array (such as "kW", "KW"),
759
+
// then the first one is the preferred value, but iD will still
760
+
// recognise the alternative/s.
761
+
"meter": ["m"],
762
+
"centimeter": ["cm"],
763
+
"millimeter": [""], // mm is the default unit in OSM, so the tag value should have no suffix.
764
+
"yard": ["yd"]
765
+
}
766
+
}
767
+
}
768
+
```
769
+
770
+
Translations for the [`narrow` and `long` form](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) of each unit are bundled into iD-tagging-schema's locale files.
771
+
743
772
### Deprecations
744
773
745
774
Use `deprecated.json` ([Example](https://github.com/openstreetmap/id-tagging-schema/blob/main/data/deprecated.json), [Schema](https://github.com/ideditor/schema-builder/blob/main/schemas/deprecated.json)) to specify tag deprecations.
0 commit comments