Merge pull request #4703 from gberaudo/source_options_fixes

Source options fixes.
This commit is contained in:
Tim Schaub
2016-01-21 07:54:26 -07:00
2 changed files with 9 additions and 9 deletions
+6 -6
View File
@@ -4053,7 +4053,7 @@ olx.source.TileUTFGridOptions.prototype.url;
* opaque: (boolean|undefined), * opaque: (boolean|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.proj.ProjectionLike,
* reprojectionErrorThreshold: (number|undefined), * reprojectionErrorThreshold: (number|undefined),
* state: (ol.source.State|string|undefined), * state: (ol.source.State|undefined),
* tileClass: (function(new: ol.ImageTile, ol.TileCoord, * tileClass: (function(new: ol.ImageTile, ol.TileCoord,
* ol.TileState, string, ?string, * ol.TileState, string, ?string,
* ol.TileLoadFunctionType)|undefined), * ol.TileLoadFunctionType)|undefined),
@@ -4124,7 +4124,7 @@ olx.source.TileImageOptions.prototype.reprojectionErrorThreshold;
/** /**
* Source state. * Source state.
* @type {ol.source.State|string|undefined} * @type {ol.source.State|undefined}
* @api * @api
*/ */
olx.source.TileImageOptions.prototype.state; olx.source.TileImageOptions.prototype.state;
@@ -4210,7 +4210,7 @@ olx.source.TileImageOptions.prototype.wrapX;
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* opaque: (boolean|undefined), * opaque: (boolean|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.proj.ProjectionLike,
* state: (ol.source.State|string|undefined), * state: (ol.source.State|undefined),
* tileClass: (function(new: ol.VectorTile, ol.TileCoord, * tileClass: (function(new: ol.VectorTile, ol.TileCoord,
* ol.TileState, string, ol.format.Feature, * ol.TileState, string, ol.format.Feature,
* ol.TileLoadFunctionType)|undefined), * ol.TileLoadFunctionType)|undefined),
@@ -4270,7 +4270,7 @@ olx.source.VectorTileOptions.prototype.projection;
/** /**
* Source state. * Source state.
* @type {ol.source.State|string|undefined} * @type {ol.source.State|undefined}
* @api * @api
*/ */
olx.source.VectorTileOptions.prototype.state; olx.source.VectorTileOptions.prototype.state;
@@ -4608,7 +4608,7 @@ olx.source.OSMOptions.prototype.wrapX;
* projection: ol.proj.ProjectionLike, * projection: ol.proj.ProjectionLike,
* ratio: (number|undefined), * ratio: (number|undefined),
* resolutions: (Array.<number>|undefined), * resolutions: (Array.<number>|undefined),
* state: (ol.source.State|string|undefined)}} * state: (ol.source.State|undefined)}}
* @api * @api
*/ */
olx.source.ImageCanvasOptions; olx.source.ImageCanvasOptions;
@@ -4674,7 +4674,7 @@ olx.source.ImageCanvasOptions.prototype.resolutions;
/** /**
* Source state. * Source state.
* @type {ol.source.State|string|undefined} * @type {ol.source.State|undefined}
* @api * @api
*/ */
olx.source.ImageCanvasOptions.prototype.state; olx.source.ImageCanvasOptions.prototype.state;
+3 -3
View File
@@ -12,11 +12,12 @@ goog.require('ol.source.TileEvent');
/** /**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined), * @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* cacheSize: (number|undefined),
* extent: (ol.Extent|undefined), * extent: (ol.Extent|undefined),
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* opaque: (boolean|undefined), * opaque: (boolean|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.proj.ProjectionLike,
* state: (ol.source.State|string|undefined), * state: (ol.source.State|undefined),
* tileGrid: (ol.tilegrid.TileGrid|undefined), * tileGrid: (ol.tilegrid.TileGrid|undefined),
* tileLoadFunction: ol.TileLoadFunctionType, * tileLoadFunction: ol.TileLoadFunctionType,
* tilePixelRatio: (number|undefined), * tilePixelRatio: (number|undefined),
@@ -46,8 +47,7 @@ ol.source.UrlTile = function(options) {
logo: options.logo, logo: options.logo,
opaque: options.opaque, opaque: options.opaque,
projection: options.projection, projection: options.projection,
state: options.state ? state: options.state,
/** @type {ol.source.State} */ (options.state) : undefined,
tileGrid: options.tileGrid, tileGrid: options.tileGrid,
tilePixelRatio: options.tilePixelRatio, tilePixelRatio: options.tilePixelRatio,
wrapX: options.wrapX wrapX: options.wrapX