From 651d358416d1764fb317bc13376a0d0e61744d3c Mon Sep 17 00:00:00 2001 From: zstadler Date: Mon, 25 Oct 2021 11:26:55 +0300 Subject: [PATCH] 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" }, ``` --- API.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index 8b990cb90..55972a4fb 100644 --- a/API.md +++ b/API.md @@ -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:`, 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)" } -``` \ No newline at end of file +```