Skip to content

Commit e16cbdf

Browse files
committed
Merge branch 'main' into tordans-patch-1
2 parents ac08f7d + d7e456d commit e16cbdf

File tree

14 files changed

+3302
-3194
lines changed

14 files changed

+3302
-3194
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node-version: [20]
18+
node-version: [22, 24]
1919

2020
steps:
2121
- uses: actions/checkout@v2

ICONS.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ For presets and some fields, icons can be specified. They provide an additional
66

77
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"`.
88

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:
14-
* [Solid](https://fontawesome.com/search?o=r&ic=free&s=solid) (`fas-`)
15-
* [Regular](https://fontawesome.com/search?o=r&ic=free&s=regular) (`far-`)
16-
* [Brands](https://fontawesome.com/search?o=r&ic=free&ip=brands) (`fab-`)
17-
* [iD's presets-icons](https://github.com/openstreetmap/iD/tree/develop/svg/iD-sprite/presets), [iD's fields-icons](https://github.com/openstreetmap/iD/tree/develop/svg/iD-sprite/fields) (`iD-`)
9+
| Name | Prefix | Description | Preview |
10+
|------|-----------|-------------|---------|
11+
| [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) |
17+
| [iD Presets](https://github.com/openstreetmap/iD/tree/develop/svg/iD-sprite/presets) | `iD-` | iD's presets-icons | - |
18+
| [iD Fields](https://github.com/openstreetmap/iD/tree/develop/svg/iD-sprite/fields) | `iD-` | iD's fields-icons | - |
1819

1920
## How can I add new icons?
2021

README.md

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ everything in this directory will be overwritten when building. Defaults to `int
4040
- `outDirectory`: `string`, The relative directory of the built data files intended for distribution. Be aware that
4141
everything in this directory will be overwritten when building. Defaults to `dist`.
4242
- `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):
4444
- 🄿: [preset](https://github.com/openstreetmap/id-tagging-schema/tree/main/data/presets)
4545
- 🄵: [field](https://github.com/openstreetmap/id-tagging-schema/tree/main/data/fields)
4646
- 🄵🅅: field value
@@ -344,7 +344,7 @@ This means that they will be recognized by iD when editing existing data,
344344
but will not be available as an option when adding new features.
345345

346346
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,
348348
the underscore is omitted (e.g. `{landuse/farm}`).
349349

350350
##### `matchScore`
@@ -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
@@ -490,11 +490,11 @@ A string specifying how iD uses the field. Must be one of the following values.
490490

491491
##### `key`/`keys`
492492

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:
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"]`
@@ -503,7 +503,7 @@ field type | `key` | `keys` | description | example
503503
`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:"`
504504
`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", …]`
505505
`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`. |
507507
all other fields | :heavy_check_mark: | :x: | A regular field which only operates on a single tag. | `"key": "oneway"`
508508

509509
[^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.
563563
If `autoSuggestions` is `true` (as per default), then raw and labeled values might be mixed
564564
in the dropdown suggestions.
565565

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
567567
in iD to give additional context on a value ([Example](https://github.com/openstreetmap/id-tagging-schema/blob/main/data/fields/parking.json)).
568568

569569
```js
@@ -601,12 +601,21 @@ in iD to give additional context on a value ([Example](https://github.com/openst
601601
//
602602
```
603603

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
605605
to the different states of the checkbox input element, in the following order:
606606
1. fields of type `check`: _unset state_ (must use the option `undefined`), _checked state_,
607607
_unchecked state_ ([example](https://github.com/openstreetmap/id-tagging-schema/blob/2375a6b/data/fields/parcel_pickup.json))
608608
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))
609609

610+
The value of each option can be a reference to another field or preset's name. For example:
611+
```json
612+
"strings": {
613+
"options": {
614+
"portal_crane": "{presets/man_made/crane/portal_crane}",
615+
}
616+
}
617+
```
618+
610619
##### `stringsCrossReference`
611620

612621
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
635644

636645
##### `minValue`
637646

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.
639648

640649
##### `maxValue`
641650

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.
643652

644653
##### `increment`
645654

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`.
647656

648657
##### `prerequisiteTag`
649658

650659
An object defining the tags the feature needs before this field will be displayed. It may have this property:
651660

652661
- `key`: The key for the required tag.
653662

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:
655664

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.
658667

659668
Alternatively, the object may contain a single property:
660669

661670
- `keyNot`: The key that must not be present.
662671

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`.
664676

665677
```js
666678
"prerequisiteTag": {
@@ -669,8 +681,6 @@ For example, this is how we show the Internet Access Fee field only if the featu
669681
}
670682
```
671683

672-
If a feature has a value for this field's `key` or `keys`, it will display regardless of the `prerequisiteTag` property.
673-
674684
##### `locationSet`
675685

676686
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

Comments
 (0)