More words about replacement tokens in custom tile url prompt

(see #3887)
This commit is contained in:
Bryan Housel
2017-06-22 21:56:22 -04:00
parent 9882cf1d7b
commit ec8cd6ec83
4 changed files with 4 additions and 4 deletions

2
API.md
View File

@@ -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`

View File

@@ -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

View File

@@ -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",

View File

@@ -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);