diff --git a/src/ol/layer/tile.js b/src/ol/layer/tile.js index 0ac7ecdbaf..8a68aa7216 100644 --- a/src/ol/layer/tile.js +++ b/src/ol/layer/tile.js @@ -2,6 +2,7 @@ goog.provide('ol.layer.Tile'); goog.require('ol'); goog.require('ol.layer.Layer'); +goog.require('ol.layer.TileProperty'); goog.require('ol.obj'); @@ -42,7 +43,7 @@ ol.inherits(ol.layer.Tile, ol.layer.Layer); * @api */ ol.layer.Tile.prototype.getPreload = function() { - return /** @type {number} */ (this.get(ol.layer.Tile.Property.PRELOAD)); + return /** @type {number} */ (this.get(ol.layer.TileProperty.PRELOAD)); }; @@ -62,7 +63,7 @@ ol.layer.Tile.prototype.getSource; * @api */ ol.layer.Tile.prototype.setPreload = function(preload) { - this.set(ol.layer.Tile.Property.PRELOAD, preload); + this.set(ol.layer.TileProperty.PRELOAD, preload); }; @@ -74,7 +75,7 @@ ol.layer.Tile.prototype.setPreload = function(preload) { */ ol.layer.Tile.prototype.getUseInterimTilesOnError = function() { return /** @type {boolean} */ ( - this.get(ol.layer.Tile.Property.USE_INTERIM_TILES_ON_ERROR)); + this.get(ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR)); }; @@ -86,14 +87,5 @@ ol.layer.Tile.prototype.getUseInterimTilesOnError = function() { */ ol.layer.Tile.prototype.setUseInterimTilesOnError = function(useInterimTilesOnError) { this.set( - ol.layer.Tile.Property.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError); -}; - - -/** - * @enum {string} - */ -ol.layer.Tile.Property = { - PRELOAD: 'preload', - USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError' + ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError); }; diff --git a/src/ol/layer/tileproperty.js b/src/ol/layer/tileproperty.js new file mode 100644 index 0000000000..71cba03390 --- /dev/null +++ b/src/ol/layer/tileproperty.js @@ -0,0 +1,9 @@ +goog.provide('ol.layer.TileProperty'); + +/** + * @enum {string} + */ +ol.layer.TileProperty = { + PRELOAD: 'preload', + USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError' +}; diff --git a/src/ol/layer/vectortile.js b/src/ol/layer/vectortile.js index 18e9128fc4..7b61343db2 100644 --- a/src/ol/layer/vectortile.js +++ b/src/ol/layer/vectortile.js @@ -2,7 +2,7 @@ goog.provide('ol.layer.VectorTile'); goog.require('ol'); goog.require('ol.asserts'); -goog.require('ol.layer.Tile'); +goog.require('ol.layer.TileProperty'); goog.require('ol.layer.Vector'); goog.require('ol.obj'); @@ -86,7 +86,7 @@ ol.layer.VectorTile.prototype.getUseInterimTilesOnError = function() { * @api */ ol.layer.VectorTile.prototype.setPreload = function(preload) { - this.set(ol.layer.Tile.Property.PRELOAD, preload); + this.set(ol.layer.TileProperty.PRELOAD, preload); }; @@ -98,7 +98,7 @@ ol.layer.VectorTile.prototype.setPreload = function(preload) { */ ol.layer.VectorTile.prototype.setUseInterimTilesOnError = function(useInterimTilesOnError) { this.set( - ol.layer.Tile.Property.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError); + ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError); };