Make tile transitions configurable

This commit is contained in:
Tim Schaub
2017-09-16 15:54:29 -06:00
parent 76726a3a6f
commit 16e6d13700
25 changed files with 259 additions and 73 deletions

View File

@@ -463,6 +463,23 @@ olx.SphereMetricOptions.prototype.projection;
olx.SphereMetricOptions.prototype.radius;
/**
* Options for tile constructors.
* @typedef {{transition: (number|undefined)}}
*/
olx.TileOptions;
/**
* A duration for tile opacity transitions. By default, tiles will render with
* a opacity transition that lasts 250 ms. To change the duration, pass a
* number in milliseconds. A duration of 0 disables the opacity transition.
* @type {number|undefined}
* @api
*/
olx.TileOptions.prototype.transition;
/**
* Object literal with options for the {@link ol.Map#forEachFeatureAtPixel} and
* {@link ol.Map#hasFeatureAtPixel} methods.
@@ -4597,7 +4614,8 @@ olx.source;
* maxZoom: (number|undefined),
* reprojectionErrorThreshold: (number|undefined),
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
* wrapX: (boolean|undefined)}}
* wrapX: (boolean|undefined),
* transition: (number|undefined)}}
*/
olx.source.BingMapsOptions;
@@ -4681,6 +4699,15 @@ olx.source.BingMapsOptions.prototype.tileLoadFunction;
olx.source.BingMapsOptions.prototype.wrapX;
/**
* Duration of the opacity transition for rendering. To disable the opacity
* transition, pass `transition: 0`.
* @type {number|undefined}
* @api
*/
olx.source.BingMapsOptions.prototype.transition;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* distance: (number|undefined),
@@ -4845,7 +4872,8 @@ olx.source.TileUTFGridOptions.prototype.url;
* tileUrlFunction: (ol.TileUrlFunctionType|undefined),
* url: (string|undefined),
* urls: (Array.<string>|undefined),
* wrapX: (boolean|undefined)}}
* wrapX: (boolean|undefined),
* transition: (number|undefined)}}
*/
olx.source.TileImageOptions;
@@ -4998,6 +5026,15 @@ olx.source.TileImageOptions.prototype.urls;
olx.source.TileImageOptions.prototype.wrapX;
/**
* Duration of the opacity transition for rendering. To disable the opacity
* transition, pass `transition: 0`.
* @type {number|undefined}
* @api
*/
olx.source.TileImageOptions.prototype.transition;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -5014,7 +5051,8 @@ olx.source.TileImageOptions.prototype.wrapX;
* tileUrlFunction: (ol.TileUrlFunctionType|undefined),
* url: (string|undefined),
* urls: (Array.<string>|undefined),
* wrapX: (boolean|undefined)}}
* wrapX: (boolean|undefined),
* transition: (number|undefined)}}
*/
olx.source.VectorTileOptions;
@@ -5154,6 +5192,15 @@ olx.source.VectorTileOptions.prototype.urls;
olx.source.VectorTileOptions.prototype.wrapX;
/**
* Duration of the opacity transition for rendering. To disable the opacity
* transition, pass `transition: 0`.
* @type {number|undefined}
* @api
*/
olx.source.VectorTileOptions.prototype.transition;
/**
* @typedef {{url: (string|undefined),
* displayDpi: (number|undefined),
@@ -6070,7 +6117,8 @@ olx.source.ImageStaticOptions.prototype.url;
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
* url: (string|undefined),
* urls: (Array.<string>|undefined),
* wrapX: (boolean|undefined)}}
* wrapX: (boolean|undefined),
* transition: (number|undefined)}}
*/
olx.source.TileArcGISRestOptions;
@@ -6184,6 +6232,15 @@ olx.source.TileArcGISRestOptions.prototype.url;
olx.source.TileArcGISRestOptions.prototype.wrapX;
/**
* Duration of the opacity transition for rendering. To disable the opacity
* transition, pass `transition: 0`.
* @type {number|undefined}
* @api
*/
olx.source.TileArcGISRestOptions.prototype.transition;
/**
* ArcGIS Rest service urls. Use this instead of `url` when the ArcGIS Service supports multiple
* urls for export requests.
@@ -6202,7 +6259,8 @@ olx.source.TileArcGISRestOptions.prototype.urls;
* tileJSON: (TileJSON|undefined),
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
* url: (string|undefined),
* wrapX: (boolean|undefined)}}
* wrapX: (boolean|undefined),
* transition: (number|undefined)}}
*/
olx.source.TileJSONOptions;
@@ -6293,6 +6351,15 @@ olx.source.TileJSONOptions.prototype.url;
olx.source.TileJSONOptions.prototype.wrapX;
/**
* Duration of the opacity transition for rendering. To disable the opacity
* transition, pass `transition: 0`.
* @type {number|undefined}
* @api
*/
olx.source.TileJSONOptions.prototype.transition;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -6311,7 +6378,8 @@ olx.source.TileJSONOptions.prototype.wrapX;
* tileLoadFunction: (ol.TileLoadFunctionType|undefined),
* url: (string|undefined),
* urls: (Array.<string>|undefined),
* wrapX: (boolean|undefined)}}
* wrapX: (boolean|undefined),
* transition: (number|undefined)}}
*/
olx.source.TileWMSOptions;
@@ -6475,6 +6543,15 @@ olx.source.TileWMSOptions.prototype.urls;
olx.source.TileWMSOptions.prototype.wrapX;
/**
* Duration of the opacity transition for rendering. To disable the opacity
* transition, pass `transition: 0`.
* @type {number|undefined}
* @api
*/
olx.source.TileWMSOptions.prototype.transition;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* features: (Array.<ol.Feature>|ol.Collection.<ol.Feature>|undefined),
@@ -6630,7 +6707,8 @@ olx.source.VectorOptions.prototype.wrapX;
* tileClass: (function(new: ol.ImageTile, ol.TileCoord,
* ol.TileState, string, ?string,
* ol.TileLoadFunctionType)|undefined),
* wrapX: (boolean|undefined)}}
* wrapX: (boolean|undefined),
* transition: (number|undefined)}}
*/
olx.source.WMTSOptions;
@@ -6814,6 +6892,15 @@ olx.source.WMTSOptions.prototype.urls;
olx.source.WMTSOptions.prototype.wrapX;
/**
* Duration of the opacity transition for rendering. To disable the opacity
* transition, pass `transition: 0`.
* @type {number|undefined}
* @api
*/
olx.source.WMTSOptions.prototype.transition;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -6831,7 +6918,8 @@ olx.source.WMTSOptions.prototype.wrapX;
* tileUrlFunction: (ol.TileUrlFunctionType|undefined),
* url: (string|undefined),
* urls: (Array.<string>|undefined),
* wrapX: (boolean|undefined)}}
* wrapX: (boolean|undefined),
* transition: (number|undefined)}}
*/
olx.source.XYZOptions;
@@ -6987,6 +7075,16 @@ olx.source.XYZOptions.prototype.urls;
*/
olx.source.XYZOptions.prototype.wrapX;
/**
* Duration of the opacity transition for rendering. To disable the opacity
* transition, pass `transition: 0`.
* @type {number|undefined}
* @api
*/
olx.source.XYZOptions.prototype.transition;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
@@ -7111,7 +7209,8 @@ olx.source.CartoDBOptions.prototype.account;
* reprojectionErrorThreshold: (number|undefined),
* url: !string,
* tierSizeCalculation: (string|undefined),
* size: ol.Size}}
* size: ol.Size,
* transition: (number|undefined)}}
*/
olx.source.ZoomifyOptions;
@@ -7202,6 +7301,15 @@ olx.source.ZoomifyOptions.prototype.tierSizeCalculation;
olx.source.ZoomifyOptions.prototype.size;
/**
* Duration of the opacity transition for rendering. To disable the opacity
* transition, pass `transition: 0`.
* @type {number|undefined}
* @api
*/
olx.source.ZoomifyOptions.prototype.transition;
/**
* Namespace.
* @type {Object}