Skip to content

Commit ee2366c

Browse files
authored
add integer field type (#217)
1 parent f666689 commit ee2366c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ A string specifying the UI and behavior of the field. Must be one of the followi
432432
###### Text fields
433433

434434
* `text` - Basic single line text field
435-
* `number` - Text field with up/down buttons for entering numbers (e.g. `width=*`)
435+
* `number` & `integer` - Text field with up/down buttons for entering numbers (e.g. `width=*`)
436436
* `localized` - Text field with localization abilities (e.g. `name=*`, `name:es=*`, etc.)
437437
* `tel` - Text field for entering phone numbers (localized for editing location)
438438
* `email` - Text field for entering email addresses
@@ -494,7 +494,7 @@ The `key` property names the OSM tag key that the field will edit. Some fields,
494494

495495
field type | `key` | `keys` | description | example
496496
---------- | ----- | ------ | ----------- | -------
497-
`text`, `number`, `email`, `url`, `tel` | :heavy_check_mark: | optional | Optionally, these fields can match multiple tag `keys` of an OSM object: which is useful to support OSM tags which have more than one established tag key like `phone` and `contact:phone`.[^1] | `"key": "phone", "keys": ["phone", "contact:phone"]`
497+
`text`, `number`, `integer`, `email`, `url`, `tel` | :heavy_check_mark: | optional | Optionally, these fields can match multiple tag `keys` of an OSM object: which is useful to support OSM tags which have more than one established tag key like `phone` and `contact:phone`.[^1] | `"key": "phone", "keys": ["phone", "contact:phone"]`
498498
`address` | :heavy_check_mark: | :heavy_check_mark: | `keys` must contains all possible subtags to be used in the address field and `key` must contain the tag key prefix (e.g. `addr`). | `"key": "addr", "keys": ["addr:city", "addr:street", …]`
499499
`wikipedia`, `wikidata` | :heavy_check_mark: | :heavy_check_mark: | As the values of these two fields should be updated in sync by the editor, the `keys` should always contain both the respective wikipedia and wikidata keys. | `"key": "flag:wikidata", "keys": ["flag:wikidata", "flag:wikipedia"]`
500500
`directionalCombo` | :heavy_check_mark: | :heavy_check_mark: | For directional fields, the `key` is the tag to use when the OSM feature has the same attributes in both directions, while the `keys` are the two tags for the individual directions. iD considers `key` with and without the `:both` suffix (for example, `cycleway` and `cycleway:both`). | `"key": "cycleway", "keys": ["cycleway:right", "cycleway:left"]`
@@ -618,15 +618,15 @@ For semiCombo fields, duplicate values are allowed if `allowDuplicates` is `true
618618

619619
##### `minValue`
620620

621-
For number fields, the lowest valid value. There is no default.
621+
For `number` & `integer` fields, the lowest valid value. There is no default.
622622

623623
##### `maxValue`
624624

625-
For number fields, the greatest valid value. There is no default.
625+
For `number` & `integer` fields, the greatest valid value. There is no default.
626626

627627
##### `increment`
628628

629-
For number fields, the amount the stepper control increases or decreases the value. The default is `1`.
629+
For `number` & `integer` fields, the amount the stepper control increases or decreases the value. The default is `1`.
630630

631631
##### `prerequisiteTag`
632632

schemas/field.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"directionalCombo",
6161
"email",
6262
"identifier",
63+
"integer",
6364
"lanes",
6465
"localized",
6566
"manyCombo",

0 commit comments

Comments
 (0)