From 2100cd30dfef239a59bf7b114e8205ac47e17edb Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Mon, 17 Mar 2014 11:31:21 +0100 Subject: [PATCH] Add wrapX option to ol.source.XYZ --- src/objectliterals.jsdoc | 2 ++ src/ol/source/xyzsource.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index 5a3586aab8..b1952cf88d 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -994,6 +994,8 @@ * @property {string|undefined} url URL template. Must include `{x}`, `{y}`, * and `{z}` placeholders. * @property {Array.|undefined} urls An array of URL templates. + * @property {boolean|undefined} wrapX Whether to wrap the world horizontally. + * Default is `true`. * @todo stability experimental */ diff --git a/src/ol/source/xyzsource.js b/src/ol/source/xyzsource.js index b41ff92de5..2c4d944e8e 100644 --- a/src/ol/source/xyzsource.js +++ b/src/ol/source/xyzsource.js @@ -41,7 +41,8 @@ ol.source.XYZ = function(options) { * @type {ol.TileCoordTransformType} */ this.tileCoordTransform_ = tileGrid.createTileCoordTransform({ - extent: options.extent + extent: options.extent, + wrapX: options.wrapX }); if (goog.isDef(options.tileUrlFunction)) {