Remove state enum from tile constructor

This commit is contained in:
Tim Schaub
2016-12-27 09:49:21 -07:00
parent 3852c0da83
commit 895a506025
22 changed files with 134 additions and 128 deletions

View File

@@ -2,8 +2,8 @@ goog.provide('ol.source.TileImage');
goog.require('ol');
goog.require('ol.ImageTile');
goog.require('ol.Tile');
goog.require('ol.TileCache');
goog.require('ol.TileState');
goog.require('ol.events');
goog.require('ol.events.EventType');
goog.require('ol.proj');
@@ -51,7 +51,7 @@ ol.source.TileImage = function(options) {
/**
* @protected
* @type {function(new: ol.ImageTile, ol.TileCoord, ol.Tile.State, string,
* @type {function(new: ol.ImageTile, ol.TileCoord, ol.TileState, string,
* ?string, ol.TileLoadFunctionType)}
*/
this.tileClass = options.tileClass !== undefined ?
@@ -219,7 +219,7 @@ ol.source.TileImage.prototype.createTile_ = function(z, x, y, pixelRatio, projec
this.tileUrlFunction(urlTileCoord, pixelRatio, projection) : undefined;
var tile = new this.tileClass(
tileCoord,
tileUrl !== undefined ? ol.Tile.State.IDLE : ol.Tile.State.EMPTY,
tileUrl !== undefined ? ol.TileState.IDLE : ol.TileState.EMPTY,
tileUrl !== undefined ? tileUrl : '',
this.crossOrigin,
this.tileLoadFunction);
@@ -305,7 +305,7 @@ ol.source.TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, pr
tile = this.createTile_(z, x, y, pixelRatio, projection, key);
//make the new tile the head of the list,
if (interimTile.getState() == ol.Tile.State.IDLE) {
if (interimTile.getState() == ol.TileState.IDLE) {
//the old tile hasn't begun loading yet, and is now outdated, so we can simply discard it
tile.interimTile = interimTile.interimTile;
} else {