From 44fdfaa630f5e99bddc6cd64cc134702fb21e5f1 Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Mon, 27 Jul 2015 16:18:26 +0100 Subject: [PATCH] Expand description for XYZ source --- src/ol/source/xyzsource.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/ol/source/xyzsource.js b/src/ol/source/xyzsource.js index 3233729166..993f001cb9 100644 --- a/src/ol/source/xyzsource.js +++ b/src/ol/source/xyzsource.js @@ -8,7 +8,20 @@ goog.require('ol.source.TileImage'); /** * @classdesc - * Layer source for tile data with URLs in a set XYZ format. + * Layer source for tile data with URLs in a set XYZ format that are + * defined in a URL template. By default, this follows the widely-used + * 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 ol.source.TileImage} can be used with a `tileUrlFunction` + * such as: + * + * tileUrlFunction: function(coordinate) { + * return 'http://mapserver.com/' + coordinate[0] + '/' + + * coordinate[1] + '/' + coordinate[2] + '.png'; + * } + * * * @constructor * @extends {ol.source.TileImage}