From d4f7b40b95218c2de100e3a4cfc696e2571325a9 Mon Sep 17 00:00:00 2001 From: mike-000 <49240900+mike-000@users.noreply.github.com> Date: Wed, 18 Nov 2020 10:44:41 +0000 Subject: [PATCH] Update TMS tileUrlFunction example --- src/ol/source/XYZ.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ol/source/XYZ.js b/src/ol/source/XYZ.js index 0d08b8e339..f7f3d95af6 100644 --- a/src/ol/source/XYZ.js +++ b/src/ol/source/XYZ.js @@ -57,15 +57,14 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js'; * Google grid where `x` 0 and `y` 0 are in the top left. Grids like * TMS where `x` 0 and `y` 0 are in the bottom left can be used by * using the `{-y}` placeholder in the URL template, so long as the - * source does not have a custom tile grid. In this case, - * {@link module:ol/source/TileImage} can be used with a `tileUrlFunction` - * such as: - * + * source does not have a custom tile grid. In this case + * a `tileUrlFunction` can be used, such as: + * ```js * tileUrlFunction: function(coordinate) { * return 'http://mapserver.com/' + coordinate[0] + '/' + - * coordinate[1] + '/' + coordinate[2] + '.png'; - * } - * + * coordinate[1] + '/' + (-tileCoord[2] - 1) + '.png'; + * } + * ``` * @api */ class XYZ extends TileImage {