Update API.md

The documentation for the `background` URL parameter](https://github.com/openstreetmap/iD/blob/develop/API.md#url-parameters) says:

> * __`background`__ - The value from a `sourcetag` property in iD's  [imagery list](https://github.com/openstreetmap/iD/blob/develop/data/imagery.json),  or a custom tile URL.

However, none of the sources in iD's  [imagery list](https://github.com/openstreetmap/iD/blob/develop/data/imagery.json?raw=true) does not have a `sourcetag` property.

In fact, iD is actually using the value of the `id` property.
For example: [https://www.openstreetmap.org/edit?editor=id&background=Mapbox](https://www.openstreetmap.org/edit?editor=id&background=Mapbox), based on
```
  {
    "id": "Mapbox",
    "name": "Mapbox Satellite",
    "type": "tms",
    "template": "https://{switch:a,b,c,d}.tiles.mapbox.com/v4/mapbox.satellite/{zoom}/{x}/{y}@2x.jpg?access_token=pk.eyJ1Ijoib3BlbnN0cmVldG1hcCIsImEiOiJja2w5YWt5bnYwNjZmMnFwZjhtbHk1MnA1In0.eq2aumBK6JuRoIuBMm6Gew",
    "tileSize": 512,
    "zoomExtent": [0, 22],
    "terms_url": "https://www.mapbox.com/about/maps",
    "terms_text": "Terms & Feedback",
    "default": true,
    "description": "Satellite and aerial imagery.",
    "icon": "https://osmlab.github.io/editor-layer-index/sources/world/MapBoxSatellite.png"
  },
```
This commit is contained in:
zstadler
2021-10-25 11:26:55 +03:00
committed by GitHub
parent 053b652548
commit 651d358416
+2 -2
View File
@@ -8,7 +8,7 @@ iD supports several URL parameters. When constructing a URL to a standalone inst
of iD (e.g. `https://ideditor-release.netlify.app`), the following parameters are available
**in the hash portion of the URL**:
* __`background`__ - The value from a `sourcetag` property in iD's
* __`background`__ - The value of the `id` property of the source in iD's
[imagery list](https://github.com/openstreetmap/iD/blob/develop/data/imagery.json),
or a custom tile URL. A custom URL is specified in the format `custom:<url>`,
where the URL can contain the standard tile URL placeholders `{x}`, `{y}` and
@@ -383,4 +383,4 @@ A "name" field must be included:
"label": "Name",
"placeholder": "Common name (if any)"
}
```
```