Add wrapX option to Stamen source

This commit is contained in:
Frederic Junod
2017-04-18 13:31:30 +02:00
parent ee2aa91d97
commit f7c71bdaac
2 changed files with 15 additions and 3 deletions

View File

@@ -5558,14 +5558,17 @@ olx.source.ImageWMSOptions.prototype.url;
/**
* @typedef {{cacheSize: (number|undefined),
* @typedef {{
* cacheSize: (number|undefined),
* layer: string,
* minZoom: (number|undefined),
* maxZoom: (number|undefined),
* opaque: (boolean|undefined),
* reprojectionErrorThreshold: (number|undefined),
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
* url: (string|undefined)}}
* url: (string|undefined),
* wrapX: (boolean|undefined)
* }}
*/
olx.source.StamenOptions;
@@ -5639,6 +5642,14 @@ olx.source.StamenOptions.prototype.tileLoadFunction;
olx.source.StamenOptions.prototype.url;
/**
* Whether to wrap the world horizontally. Default is `true`.
* @type {boolean|undefined}
* @api
*/
olx.source.StamenOptions.prototype.wrapX;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* crossOrigin: (null|string|undefined),

View File

@@ -35,7 +35,8 @@ ol.source.Stamen = function(options) {
opaque: layerConfig.opaque,
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
tileLoadFunction: options.tileLoadFunction,
url: url
url: url,
wrapX: options.wrapX
});
};
ol.inherits(ol.source.Stamen, ol.source.XYZ);