Skip to content

Commit

Permalink
Docs: Explain about options object for strings
Browse files Browse the repository at this point in the history
  • Loading branch information
tordans authored Apr 29, 2024
1 parent 07f8a35 commit 97f2bad
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,19 @@ to the different states of the checkbox input element, in the following order:
_unchecked state_ ([example](https://github.com/openstreetmap/id-tagging-schema/blob/2375a6b/data/fields/parcel_pickup.json))
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))

**Custom tooltips:**

In iD and Rapid, the default tooltip on an options string is the raw tag value. You can provide a custom tooltip via an options object:
```
"options": {
"yes": {
"title": "Allowed",
"description": "Access allowed by law; a right of way"
}
}
```
In this case, iD and Rapid will not show the original tag value but only the `description`.

##### `stringsCrossReference`

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.
Expand Down

0 comments on commit 97f2bad

Please sign in to comment.