diff --git a/API.md b/API.md index 5463c0ff3..7807f0663 100644 --- a/API.md +++ b/API.md @@ -19,7 +19,7 @@ in the hash portion of the URL: where the URL can contain the standard tile URL placeholders `{x}`, `{y}` and `{z}`/`{zoom}`, `{ty}` for flipped TMS-style Y coordinates, and `{switch:a,b,c}` for DNS multiplexing. Example: - `background=custom:https://{switch:a,b,c}.tiles.mapbox.com/v4/examples.map-4l7djmvo/{zoom}/{x}/{y}.png` + `background=custom:https://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png` * `gpx` - A custom URL for loading a gpx track. Specifying a `gpx` parameter will automatically enable the gpx layer for display. Example: `gpx=https://tasks.hotosm.org/project/592/task/16.gpx` diff --git a/data/core.yaml b/data/core.yaml index 4436d3251..b26bb755b 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -347,7 +347,7 @@ en: switch: Switch back to this background custom: Custom custom_button: Edit custom background - custom_prompt: "Enter a tile URL template. Valid tokens are {zoom}, {x}, {y} for Z/X/Y scheme and {u} for quadtile scheme.\n\nExample:\n{example}" + custom_prompt: "Enter a tile URL template. Valid tokens are:\n - {zoom}/{z}, {x}, {y} for Z/X/Y tile scheme\n - {ty} for flipped TMS-style Y coordinates\n - {u} for quadtile scheme\n - {switch:a,b,c} for DNS server multiplexing\n\nExample:\n{example}" fix_misalignment: Adjust imagery offset imagery_source_faq: Where does this imagery come from? reset: reset diff --git a/dist/locales/en.json b/dist/locales/en.json index 202b7ed46..de125c471 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -431,7 +431,7 @@ "switch": "Switch back to this background", "custom": "Custom", "custom_button": "Edit custom background", - "custom_prompt": "Enter a tile URL template. Valid tokens are {zoom}, {x}, {y} for Z/X/Y scheme and {u} for quadtile scheme.\n\nExample:\n{example}", + "custom_prompt": "Enter a tile URL template. Valid tokens are:\n - {zoom}/{z}, {x}, {y} for Z/X/Y tile scheme\n - {ty} for flipped TMS-style Y coordinates\n - {u} for quadtile scheme\n - {switch:a,b,c} for DNS server multiplexing\n\nExample:\n{example}", "fix_misalignment": "Adjust imagery offset", "imagery_source_faq": "Where does this imagery come from?", "reset": "reset", diff --git a/modules/ui/background.js b/modules/ui/background.js index 287f1b404..c87a5d3a8 100644 --- a/modules/ui/background.js +++ b/modules/ui/background.js @@ -111,7 +111,7 @@ export function uiBackground(context) { function editCustom() { d3.event.preventDefault(); - var example = 'https://tile.openstreetmap.org/{zoom}/{x}/{y}.png'; + var example = 'https://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png'; var template = window.prompt(t('background.custom_prompt', { example: example }), customTemplate); if (template) { setCustom(template);