Move State to ol.Tile

This commit is contained in:
Tim Schaub
2016-08-11 22:58:32 -06:00
parent ef468b3b06
commit 9e4d80b459
22 changed files with 126 additions and 131 deletions
+17 -17
View File
@@ -1,23 +1,10 @@
goog.provide('ol.Tile');
goog.provide('ol.TileState');
goog.require('ol');
goog.require('ol.events.EventTarget');
goog.require('ol.events.EventType');
/**
* @enum {number}
*/
ol.TileState = {
IDLE: 0,
LOADING: 1,
LOADED: 2,
ERROR: 3,
EMPTY: 4,
ABORT: 5
};
/**
* @classdesc
* Base class for tiles.
@@ -25,7 +12,7 @@ ol.TileState = {
* @constructor
* @extends {ol.events.EventTarget}
* @param {ol.TileCoord} tileCoord Tile coordinate.
* @param {ol.TileState} state State.
* @param {ol.Tile.State} state State.
*/
ol.Tile = function(tileCoord, state) {
@@ -38,7 +25,7 @@ ol.Tile = function(tileCoord, state) {
/**
* @protected
* @type {ol.TileState}
* @type {ol.Tile.State}
*/
this.state = state;
@@ -98,7 +85,7 @@ ol.Tile.prototype.getTileCoord = function() {
/**
* @return {ol.TileState} State.
* @return {ol.Tile.State} State.
*/
ol.Tile.prototype.getState = function() {
return this.state;
@@ -113,3 +100,16 @@ ol.Tile.prototype.getState = function() {
* @api
*/
ol.Tile.prototype.load = function() {};
/**
* @enum {number}
*/
ol.Tile.State = {
IDLE: 0,
LOADING: 1,
LOADED: 2,
ERROR: 3,
EMPTY: 4,
ABORT: 5
};