diff --git a/externs/olx.js b/externs/olx.js index 01445f7d27..5a0a336165 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -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), diff --git a/src/ol/source/stamen.js b/src/ol/source/stamen.js index 4c94534450..454580a5f8 100644 --- a/src/ol/source/stamen.js +++ b/src/ol/source/stamen.js @@ -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);