diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index 67add829a9..5d5f2e11eb 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -605,6 +605,24 @@ * @property {Array.|undefined} urls Urls. */ +/** + * @typedef {Object} ol.source.XYZOptions + * @property {Array.|undefined} attributions Attributions. + * @property {null|string|undefined} crossOrigin Cross origin setting for image + * requests. + * @property {ol.Extent|undefined} extent Extent. + * @property {string|undefined} logo Logo. + * @property {ol.ProjectionLike} projection Projection. + * @property {number} maxZoom Max zoom. + * @property {number|undefined} minZoom Unsupported (TODO: remove this). + * @property {ol.TileUrlFunctionType|undefined} tileUrlFunction Optional + * function to get tile URL given a tile coordinate and the projection. + * Required if url or urls are not provided. + * @property {string|undefined} url URL template. Must include '{x}', '{y}', + * and '{z}' placeholders. + * @property {Array.|undefined} urls An array of URL templates. + */ + /** * @typedef {Object} ol.style.IconOptions * @property {string|ol.expr.Expression} url Icon image url. diff --git a/src/ol/source/xyzsource.exports b/src/ol/source/xyzsource.exports index 03f275a2ed..6384d2777f 100644 --- a/src/ol/source/xyzsource.exports +++ b/src/ol/source/xyzsource.exports @@ -1 +1 @@ -@exportSymbol ol.source.XYZ \ No newline at end of file +@exportClass ol.source.XYZ ol.source.XYZOptions diff --git a/src/ol/source/xyzsource.js b/src/ol/source/xyzsource.js index bbb91c2808..c40d20865e 100644 --- a/src/ol/source/xyzsource.js +++ b/src/ol/source/xyzsource.js @@ -1,5 +1,4 @@ goog.provide('ol.source.XYZ'); -goog.provide('ol.source.XYZOptions'); goog.require('ol.Attribution'); goog.require('ol.Projection'); @@ -10,21 +9,6 @@ goog.require('ol.source.TileImage'); goog.require('ol.tilegrid.XYZ'); -/** - * @typedef {{attributions: (Array.|undefined), - * crossOrigin: (string|undefined), - * extent: (ol.Extent|undefined), - * logo: (string|undefined), - * maxZoom: number, - * minZoom: (number|undefined), - * projection: (ol.Projection|undefined), - * tileUrlFunction: (ol.TileUrlFunctionType|undefined), - * url: (string|undefined), - * urls: (Array.|undefined)}} - */ -ol.source.XYZOptions; - - /** * @constructor