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: ICONS.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,16 @@ For presets and some fields, icons can be specified. They provide an additional
6
6
7
7
Icons from the below listed sources can be used. When specifying an icon, use the prefixed version of the name, for example `"icon": "maki-park"`.
8
8
9
-
*[Maki](https://labs.mapbox.com/maki-icons/) (`maki-`), map-specific icons from Mapbox
10
-
*[Temaki](https://rapideditor.github.io/temaki/docs/) (`temaki-`), an expansion pack for Maki
11
-
*[Röntgen](https://github.com/enzet/map-machine#r%C3%B6ntgen-icon-set) ([available icons](https://github.com/openstreetmap/iD/tree/develop/svg/roentgen)) (`roentgen-`), part of the Map Machine project
12
-
*[Font Awesome](https://fontawesome.com/icons?d=gallery&m=free), thousands of general-purpose icons
13
-
* There is a free and pro tier. You can use any icon from the free tier in the following styles:
|[Maki](https://labs.mapbox.com/maki-icons/)|`maki-`| Map-specific icons from Mapbox |[Preview](https://icones.js.org/collection/maki)|
12
+
|[Temaki](https://rapideditor.github.io/temaki/docs/)|`temaki-`| An expansion pack for Maki |[Preview](https://icones.js.org/collection/temaki)|
13
+
|[Röntgen](https://github.com/enzet/map-machine#r%C3%B6ntgen-icon-set)|`roentgen-`| Part of the Map Machine project |[Preview](https://icones.js.org/collection/roentgen)|
14
+
|[Font Awesome Solid](https://fontawesome.com/search?o=r&ic=free&s=solid)|`fas-`| Solid style icons from Font Awesome (free tier) |[Preview](https://icones.js.org/collection/fa-solid)|
15
+
|[Font Awesome Regular](https://fontawesome.com/search?o=r&ic=free&s=regular)|`far-`| Regular style icons from Font Awesome (free tier) |[Preview](https://icones.js.org/collection/fa-regular)|
16
+
|[Font Awesome Brands](https://fontawesome.com/search?o=r&ic=free&ip=brands)|`fab-`| Brand icons from Font Awesome (free tier) |[Preview](https://icones.js.org/collection/fa-brands)|
Copy file name to clipboardExpand all lines: README.md
+27-17Lines changed: 27 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ everything in this directory will be overwritten when building. Defaults to `int
40
40
-`outDirectory`: `string`, The relative directory of the built data files intended for distribution. Be aware that
41
41
everything in this directory will be overwritten when building. Defaults to `dist`.
42
42
-`sourceLocale`: `string`, The code of the language/locale used for the translatable strings in the data files. Defaults to `en`.
43
-
-`taginfoProjectInfo`: `object`, Project metadata required by TagInfo ([Wiki](https://wiki.openstreetmap.org/wiki/Taginfo/Projects)). If this info is not provided, the `taginfo.json` file will not be built. See the [schema](https://github.com/taginfo/taginfo-projects/blob/master/taginfo-project-schema.json) for more details. The generated taginfo.json will use the following mnemonics to give context to the generated [description on taginfo](https://taginfo.openstreetmap.org/projects/id_editor#tags):
43
+
-`taginfoProjectInfo`: `object`, Project metadata required by TagInfo ([Wiki](https://wiki.openstreetmap.org/wiki/Taginfo/Projects)). If this info is not provided, the `taginfo.json` file will not be built. See the [schema](https://github.com/taginfo/taginfo-projects/blob/master/taginfo-project-schema.json) for more details. The generated taginfo.json will use the following mnemonics to give context to the generated [description on taginfo](https://taginfo.openstreetmap.org/projects/id_editor#tags):
@@ -344,7 +344,7 @@ This means that they will be recognized by iD when editing existing data,
344
344
but will not be available as an option when adding new features.
345
345
346
346
By convention, unsearchable presets have filenames that begin with an underscore
347
-
(e.g. `data/presets/landuse/_farm.json`). However, when using the preset name as reference,
347
+
(e.g. `data/presets/landuse/_farm.json`). However, when using the preset name as reference,
348
348
the underscore is omitted (e.g. `{landuse/farm}`).
349
349
350
350
##### `matchScore`
@@ -432,7 +432,7 @@ A string specifying the UI and behavior of the field. Must be one of the followi
432
432
###### Text fields
433
433
434
434
*`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=*`)
436
436
*`localized` - Text field with localization abilities (e.g. `name=*`, `name:es=*`, etc.)
437
437
*`tel` - Text field for entering phone numbers (localized for editing location)
438
438
*`email` - Text field for entering email addresses
@@ -490,11 +490,11 @@ A string specifying how iD uses the field. Must be one of the following values.
490
490
491
491
##### `key`/`keys`
492
492
493
-
The `key` property names the OSM tag key that the field will edit. Some fields, like the `address` field, operate on more than one tag: These expect an array of keys in the `keys` property. The following table lists which field types accept which properties:
493
+
The `key` property names the OSM tag key that the field will edit. Some fields, like the `address` field, operate on more than one tag: These expect an array of keys in the `keys` property. The following table lists which field types accept which properties:
494
494
495
495
field type | `key` | `keys` | description | example
`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"]`
498
498
`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", …]`
499
499
`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"]`
500
500
`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"]`
@@ -503,7 +503,7 @@ field type | `key` | `keys` | description | example
503
503
`multiCombo` | :heavy_check_mark: | :x: | This field allows to toggle multiple `yes/no` subtags which share a common tag prefix specified in the field's `key`. | `"key": "recycling:"`
504
504
`manyCombo` | :x: | :heavy_check_mark: | Similar to the `multiCombo` field, but here the `keys` property contains the full list of OSM tag keys which the options of the field should correspond to. | `"keys": ["hiking", "bicycle", …]`
505
505
`structureRadio` | :x: | :heavy_check_mark: | Like the `radio` field, but operates on multiple tags: Selecting an option will remove the tag for the previously active option. | `"keys": ["bridge", "tunnel", …]`
506
-
`restrictions` | :x: | :x: | A special field which does not operate on tags, therefore does not need `key` or `keys`. |
506
+
`restrictions` | :x: | :x: | A special field which does not operate on tags, therefore does not need `key` or `keys`. |
507
507
all other fields | :heavy_check_mark: | :x: | A regular field which only operates on a single tag. | `"key": "oneway"`
508
508
509
509
[^1]: The intended behaviour of a field with alternative `keys` is the following: If an OSM feature does not yet have a tag of the given `keys`, the supplied `key` will be used; if a feature has a single tag which matches a key from the `keys`, it should be used by the field; if a feature has multiple tags matching a key from the `keys` alternatives, the field should update them simultaneously and display a _multiple/conflicting values_ message if necessary.
@@ -563,7 +563,7 @@ These values populate the `options` property if it isn't otherwise specified.
563
563
If `autoSuggestions` is `true` (as per default), then raw and labeled values might be mixed
564
564
in the dropdown suggestions.
565
565
566
-
The options can either be a string or `{"title": "…", "description": "…"}` object where the description is shown on mouse over
566
+
The options can either be a string or `{"title": "…", "description": "…"}` object where the description is shown on mouse over
567
567
in iD to give additional context on a value ([Example](https://github.com/openstreetmap/id-tagging-schema/blob/main/data/fields/parking.json)).
568
568
569
569
```js
@@ -601,12 +601,21 @@ in iD to give additional context on a value ([Example](https://github.com/openst
601
601
//–
602
602
```
603
603
604
-
[Checkbox field tyes](#checkboxes) use the options keys to specify the values of the OSM tag corresponding
604
+
[Checkbox field tyes](#checkboxes) use the options keys to specify the values of the OSM tag corresponding
605
605
to the different states of the checkbox input element, in the following order:
606
606
1. fields of type `check`: _unset state_ (must use the option `undefined`), _checked state_,
2. fields of type `defaultCheck`: _unchecked state_ (must use the option `undefined`), _checked state_ ([example](https://github.com/openstreetmap/id-tagging-schema/blob/2375a6b/data/fields/crossing_raised.json))
609
609
610
+
The value of each option can be a reference to another field or preset's name. For example:
An optional property to reference to the strings 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 strings.
@@ -635,32 +644,35 @@ For semiCombo fields, duplicate values are allowed if `allowDuplicates` is `true
635
644
636
645
##### `minValue`
637
646
638
-
For number fields, the lowest valid value. There is no default.
647
+
For `number` & `integer` fields, the lowest valid value. There is no default.
639
648
640
649
##### `maxValue`
641
650
642
-
For number fields, the greatest valid value. There is no default.
651
+
For `number` & `integer` fields, the greatest valid value. There is no default.
643
652
644
653
##### `increment`
645
654
646
-
For number fields, the amount the stepper control increases or decreases the value. The default is `1`.
655
+
For `number` & `integer` fields, the amount the stepper control increases or decreases the value. The default is `1`.
647
656
648
657
##### `prerequisiteTag`
649
658
650
659
An object defining the tags the feature needs before this field will be displayed. It may have this property:
651
660
652
661
-`key`: The key for the required tag.
653
662
654
-
And may optionally be combined with one of these properties:
663
+
And may optionally be combined with one of these properties, but not both:
655
664
656
-
-`value`: The value that the key must have.
657
-
-`valueNot`: The value that the key must not have.
665
+
-`values`: The value(s) that the key must have. For backwards compatibly, `value` can also be used.
666
+
-`valuesNot`: The value(s) that the key must not have. For backwards compatibly, `valueNot` can also be used.
658
667
659
668
Alternatively, the object may contain a single property:
660
669
661
670
-`keyNot`: The key that must not be present.
662
671
663
-
For example, this is how we show the Internet Access Fee field only if the feature has an `internet_access` tag not equal to `no`.
672
+
If a feature already has a value for this field's `key`, it will always display and ignore the prerequsites.
673
+
If a field with `prerequisiteTag`s is referenced as `moreFields` the "Add field" dropdown will only include it if the prerequisites are met.
674
+
675
+
Example: This is how we show the Internet Access Fee field only if the feature has an `internet_access` tag not equal to `no`.
664
676
665
677
```js
666
678
"prerequisiteTag": {
@@ -669,8 +681,6 @@ For example, this is how we show the Internet Access Fee field only if the featu
669
681
}
670
682
```
671
683
672
-
If a feature has a value for this field's `key` or `keys`, it will display regardless of the `prerequisiteTag` property.
673
-
674
684
##### `locationSet`
675
685
676
686
An object with the identifiers of regions where this field should or shouldn't be shown. By default, fields are available everywhere.
0 commit comments