Add useInterimTilesOnError property to ol.layer.Tile
This commit is contained in:
@@ -533,6 +533,8 @@
|
|||||||
* (inclusive) at which this layer will be visible.
|
* (inclusive) at which this layer will be visible.
|
||||||
* @property {number|undefined} maxResolution The maximum resolution
|
* @property {number|undefined} maxResolution The maximum resolution
|
||||||
* (exclusive) below which this layer will be visible.
|
* (exclusive) below which this layer will be visible.
|
||||||
|
* @property {boolean|undefined} useInterimTilesOnError Use interim tiles on
|
||||||
|
* error. Default is `true`.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ goog.require('ol.layer.Layer');
|
|||||||
* @enum {string}
|
* @enum {string}
|
||||||
*/
|
*/
|
||||||
ol.layer.TileProperty = {
|
ol.layer.TileProperty = {
|
||||||
PRELOAD: 'preload'
|
PRELOAD: 'preload',
|
||||||
|
USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -51,3 +52,32 @@ goog.exportProperty(
|
|||||||
ol.layer.Tile.prototype,
|
ol.layer.Tile.prototype,
|
||||||
'setPreload',
|
'setPreload',
|
||||||
ol.layer.Tile.prototype.setPreload);
|
ol.layer.Tile.prototype.setPreload);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {boolean|undefined} Use interim tiles on error.
|
||||||
|
* @todo stability experimental
|
||||||
|
*/
|
||||||
|
ol.layer.Tile.prototype.getUseInterimTilesOnError = function() {
|
||||||
|
return /** @type {boolean|undefined} */ (
|
||||||
|
this.get(ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR));
|
||||||
|
};
|
||||||
|
goog.exportProperty(
|
||||||
|
ol.layer.Tile.prototype,
|
||||||
|
'getUseInterimTilesOnError',
|
||||||
|
ol.layer.Tile.prototype.getUseInterimTilesOnError);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {boolean|undefined} useInterimTilesOnError Use interim tiles on error.
|
||||||
|
* @todo stability experimental
|
||||||
|
*/
|
||||||
|
ol.layer.Tile.prototype.setUseInterimTilesOnError =
|
||||||
|
function(useInterimTilesOnError) {
|
||||||
|
this.set(
|
||||||
|
ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
|
||||||
|
};
|
||||||
|
goog.exportProperty(
|
||||||
|
ol.layer.Tile.prototype,
|
||||||
|
'setUseInterimTilesOnError',
|
||||||
|
ol.layer.Tile.prototype.setUseInterimTilesOnError);
|
||||||
|
|||||||
Reference in New Issue
Block a user