From 2805c55ff37ba715fdb8f28f0b381556dda8ca82 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 13 Mar 2020 16:43:04 -0400 Subject: [PATCH] Update the custom background instructions pane to include wms --- data/core.yaml | 2 +- dist/locales/en.json | 2 +- modules/renderer/background_source.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index 153f2b791..1539f0d7a 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -733,7 +733,7 @@ en: custom_background: tooltip: Edit custom background header: Custom Background Settings - instructions: "Enter a tile URL template. Valid tokens are:\n {zoom} or {z}, {x}, {y} for Z/X/Y tile scheme\n {-y} or {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}" + instructions: "Enter a tile URL template below.\n\nSupported WMS tokens:\n `{proj}`: requested projection (`EPSG:3857` only)\n `{wkid}`: same as proj, but without the EPSG (`3857` only)\n `{width}`, `{height}`: requested image dimensions (`256` only)\n `{bbox}`: requested bounding box (e.g. `minX,minY,maxX,maxY`)\n\nSupported TMS tokens:\n `{zoom}` or `{z}, `{x}`, `{y}`: Z/X/Y tile coordinates\n `{-y}` or `{ty}`: flipped TMS-style Y coordinates\n `{switch:a,b,c}`: DNS server multiplexing\n `{u}`: quadtile (Bing) scheme\n\nExample:\n{example}" template: placeholder: Enter a url template custom_data: diff --git a/dist/locales/en.json b/dist/locales/en.json index 492e1857f..712998647 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -924,7 +924,7 @@ "custom_background": { "tooltip": "Edit custom background", "header": "Custom Background Settings", - "instructions": "Enter a tile URL template. Valid tokens are:\n {zoom} or {z}, {x}, {y} for Z/X/Y tile scheme\n {-y} or {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}", + "instructions": "Enter a tile URL template below.\n\nSupported WMS tokens:\n `{proj}`: requested projection (`EPSG:3857` only)\n `{wkid}`: same as proj, but without the EPSG (`3857` only)\n `{width}`, `{height}`: requested image dimensions (`256` only)\n `{bbox}`: requested bounding box (e.g. `minX,minY,maxX,maxY`)\n\nSupported TMS tokens:\n `{zoom}` or `{z}, `{x}`, `{y}`: Z/X/Y tile coordinates\n `{-y}` or `{ty}`: flipped TMS-style Y coordinates\n `{switch:a,b,c}`: DNS server multiplexing\n `{u}`: quadtile (Bing) scheme\n\nExample:\n{example}", "template": { "placeholder": "Enter a url template" } diff --git a/modules/renderer/background_source.js b/modules/renderer/background_source.js index c0087beab..236f05060 100644 --- a/modules/renderer/background_source.js +++ b/modules/renderer/background_source.js @@ -135,8 +135,8 @@ export function rendererBackgroundSource(data) { } }); - var tileSize = this.tileSize; - var projection = this.projection; + var tileSize = source.tileSize; + var projection = source.projection; var minXmaxY = tileToProjectedCoords(coord[0], coord[1], coord[2]); var maxXminY = tileToProjectedCoords(coord[0]+1, coord[1]+1, coord[2]); @@ -189,7 +189,7 @@ export function rendererBackgroundSource(data) { // these apply to any type.. result = result - .replace('{apikey}', (this.apikey || '')) + .replace('{apikey}', (source.apikey || '')) .replace(/\{switch:([^}]+)\}/, function(s, r) { var subdomains = r.split(','); return subdomains[(coord[0] + coord[1]) % subdomains.length];