Rename ol.layer.TileProperty to ol.layer.Tile.Property

This commit is contained in:
Frederic Junod
2016-09-07 10:47:39 +02:00
parent 302f37ae7a
commit d35537e975
3 changed files with 17 additions and 15 deletions

View File

@@ -5,15 +5,6 @@ goog.require('ol.layer.Layer');
goog.require('ol.obj');
/**
* @enum {string}
*/
ol.layer.TileProperty = {
PRELOAD: 'preload',
USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError'
};
/**
* @classdesc
* For layer sources that provide pre-rendered, tiled images in grids that are
@@ -51,7 +42,7 @@ ol.inherits(ol.layer.Tile, ol.layer.Layer);
* @api
*/
ol.layer.Tile.prototype.getPreload = function() {
return /** @type {number} */ (this.get(ol.layer.TileProperty.PRELOAD));
return /** @type {number} */ (this.get(ol.layer.Tile.Property.PRELOAD));
};
@@ -71,7 +62,7 @@ ol.layer.Tile.prototype.getSource;
* @api
*/
ol.layer.Tile.prototype.setPreload = function(preload) {
this.set(ol.layer.TileProperty.PRELOAD, preload);
this.set(ol.layer.Tile.Property.PRELOAD, preload);
};
@@ -83,7 +74,7 @@ ol.layer.Tile.prototype.setPreload = function(preload) {
*/
ol.layer.Tile.prototype.getUseInterimTilesOnError = function() {
return /** @type {boolean} */ (
this.get(ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR));
this.get(ol.layer.Tile.Property.USE_INTERIM_TILES_ON_ERROR));
};
@@ -95,5 +86,14 @@ ol.layer.Tile.prototype.getUseInterimTilesOnError = function() {
*/
ol.layer.Tile.prototype.setUseInterimTilesOnError = function(useInterimTilesOnError) {
this.set(
ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
ol.layer.Tile.Property.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
};
/**
* @enum {string}
*/
ol.layer.Tile.Property = {
PRELOAD: 'preload',
USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError'
};

View File

@@ -2,6 +2,7 @@ goog.provide('ol.layer.VectorTile');
goog.require('ol');
goog.require('ol.asserts');
goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector');
goog.require('ol.obj');
@@ -94,7 +95,7 @@ ol.layer.VectorTile.prototype.getUseInterimTilesOnError = function() {
* @api
*/
ol.layer.VectorTile.prototype.setPreload = function(preload) {
this.set(ol.layer.TileProperty.PRELOAD, preload);
this.set(ol.layer.Tile.Property.PRELOAD, preload);
};
@@ -106,7 +107,7 @@ ol.layer.VectorTile.prototype.setPreload = function(preload) {
*/
ol.layer.VectorTile.prototype.setUseInterimTilesOnError = function(useInterimTilesOnError) {
this.set(
ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
ol.layer.Tile.Property.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
};