Accept simpler attributions in sources

This commit is contained in:
Marc Jansen
2016-03-10 11:13:54 +01:00
parent 74006a91fe
commit df4f1c1389
7 changed files with 217 additions and 47 deletions
+37 -31
View File
@@ -3903,6 +3903,13 @@ olx.render.ToContextOptions.prototype.pixelRatio;
olx.source;
/**
* @typedef {string|Array.<string>|ol.Attribution|Array.<ol.Attribution>}
* @api
*/
olx.source.AttributionOption;
/**
* @typedef {{cacheSize: (number|undefined),
* culture: (string|undefined),
@@ -3989,7 +3996,7 @@ olx.source.BingMapsOptions.prototype.wrapX;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* distance: (number|undefined),
* extent: (ol.Extent|undefined),
* format: (ol.format.Feature|undefined),
@@ -4005,7 +4012,7 @@ olx.source.ClusterOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api
*/
olx.source.ClusterOptions.prototype.attributions;
@@ -4115,7 +4122,7 @@ olx.source.TileUTFGridOptions.prototype.url;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* cacheSize: (number|undefined),
* crossOrigin: (null|string|undefined),
* logo: (string|olx.LogoOptions|undefined),
@@ -4140,7 +4147,7 @@ olx.source.TileImageOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api
*/
olx.source.TileImageOptions.prototype.attributions;
@@ -4287,7 +4294,7 @@ olx.source.TileImageOptions.prototype.wrapX;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* cacheSize: (number|undefined),
* format: (ol.format.Feature|undefined),
* logo: (string|olx.LogoOptions|undefined),
@@ -4311,13 +4318,12 @@ olx.source.VectorTileOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api
*/
olx.source.VectorTileOptions.prototype.attributions;
/**
* Cache size. Default is `128`.
* @type {number|undefined}
@@ -4640,7 +4646,7 @@ olx.source.TileDebugOptions.prototype.wrapX;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* cacheSize: (number|undefined),
* crossOrigin: (null|string|undefined),
* maxZoom: (number|undefined),
@@ -4656,7 +4662,7 @@ olx.source.OSMOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api stable
*/
olx.source.OSMOptions.prototype.attributions;
@@ -4740,7 +4746,7 @@ olx.source.OSMOptions.prototype.wrapX;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* canvasFunction: ol.CanvasFunctionType,
* logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike,
@@ -4754,7 +4760,7 @@ olx.source.ImageCanvasOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api
*/
olx.source.ImageCanvasOptions.prototype.attributions;
@@ -4819,7 +4825,7 @@ olx.source.ImageCanvasOptions.prototype.state;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike,
* ratio: (number|undefined),
@@ -4833,7 +4839,7 @@ olx.source.ImageVectorOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api
*/
olx.source.ImageVectorOptions.prototype.attributions;
@@ -4951,7 +4957,7 @@ olx.source.RasterOptions.prototype.operationType;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* crossOrigin: (null|string|undefined),
* hidpi: (boolean|undefined),
* serverType: (ol.source.wms.ServerType|string|undefined),
@@ -4969,7 +4975,7 @@ olx.source.ImageWMSOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api stable
*/
olx.source.ImageWMSOptions.prototype.attributions;
@@ -5149,7 +5155,7 @@ olx.source.StamenOptions.prototype.url;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* crossOrigin: (null|string|undefined),
* imageExtent: (ol.Extent),
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
@@ -5164,7 +5170,7 @@ olx.source.ImageStaticOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api stable
*/
olx.source.ImageStaticOptions.prototype.attributions;
@@ -5233,7 +5239,7 @@ olx.source.ImageStaticOptions.prototype.url;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* cacheSize: (number|undefined),
* crossOrigin: (null|string|undefined),
* params: (Object.<string, *>|undefined),
@@ -5252,7 +5258,7 @@ olx.source.TileArcGISRestOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api
*/
olx.source.TileArcGISRestOptions.prototype.attributions;
@@ -5369,7 +5375,7 @@ olx.source.TileArcGISRestOptions.prototype.urls;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* cacheSize: (number|undefined),
* crossOrigin: (null|string|undefined),
* jsonp: (boolean|undefined),
@@ -5386,7 +5392,7 @@ olx.source.TileJSONOptions;
* Optional attributions for the source. If provided, these will be used
* instead of any attribution data advertised by the server. If not provided,
* any attributions advertised by the server will be used.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api stable
*/
olx.source.TileJSONOptions.prototype.attributions;
@@ -5460,7 +5466,7 @@ olx.source.TileJSONOptions.prototype.wrapX;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* cacheSize: (number|undefined),
* params: Object.<string,*>,
* crossOrigin: (null|string|undefined),
@@ -5483,7 +5489,7 @@ olx.source.TileWMSOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api stable
*/
olx.source.TileWMSOptions.prototype.attributions;
@@ -5639,7 +5645,7 @@ olx.source.TileWMSOptions.prototype.wrapX;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* features: (Array.<ol.Feature>|ol.Collection.<ol.Feature>|undefined),
* format: (ol.format.Feature|undefined),
* loader: (ol.FeatureLoader|undefined),
@@ -5655,7 +5661,7 @@ olx.source.VectorOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api stable
*/
olx.source.VectorOptions.prototype.attributions;
@@ -5759,7 +5765,7 @@ olx.source.VectorOptions.prototype.wrapX;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* cacheSize: (number|undefined),
* crossOrigin: (string|null|undefined),
* logo: (string|olx.LogoOptions|undefined),
@@ -5789,7 +5795,7 @@ olx.source.WMTSOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api
*/
olx.source.WMTSOptions.prototype.attributions;
@@ -5975,7 +5981,7 @@ olx.source.WMTSOptions.prototype.wrapX;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* cacheSize: (number|undefined),
* crossOrigin: (null|string|undefined),
* logo: (string|olx.LogoOptions|undefined),
@@ -5999,7 +6005,7 @@ olx.source.XYZOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api stable
*/
olx.source.XYZOptions.prototype.attributions;
@@ -6150,7 +6156,7 @@ olx.source.XYZOptions.prototype.wrapX;
/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* @typedef {{attributions: (olx.source.AttributionOption|undefined),
* cacheSize: (number|undefined),
* crossOrigin: (null|string|undefined),
* logo: (string|olx.LogoOptions|undefined),
@@ -6165,7 +6171,7 @@ olx.source.ZoomifyOptions;
/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
* @type {olx.source.AttributionOption|undefined}
* @api stable
*/
olx.source.ZoomifyOptions.prototype.attributions;