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
+7 -6
View File
@@ -2,6 +2,7 @@ goog.provide('ol.VectorTile');
goog.require('ol');
goog.require('ol.Tile');
goog.require('ol.TileState');
goog.require('ol.dom');
goog.require('ol.featureloader');
@@ -10,7 +11,7 @@ goog.require('ol.featureloader');
* @constructor
* @extends {ol.Tile}
* @param {ol.TileCoord} tileCoord Tile coordinate.
* @param {ol.Tile.State} state State.
* @param {ol.TileState} state State.
* @param {string} src Data source url.
* @param {ol.format.Feature} format Feature format.
* @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.
@@ -141,8 +142,8 @@ ol.VectorTile.prototype.getProjection = function() {
* Load the tile.
*/
ol.VectorTile.prototype.load = function() {
if (this.state == ol.Tile.State.IDLE) {
this.setState(ol.Tile.State.LOADING);
if (this.state == ol.TileState.IDLE) {
this.setState(ol.TileState.LOADING);
this.tileLoadFunction_(this, this.url_);
this.loader_(null, NaN, null);
}
@@ -164,7 +165,7 @@ ol.VectorTile.prototype.onLoad_ = function(features, dataProjection) {
* Handler for tile load errors.
*/
ol.VectorTile.prototype.onError_ = function() {
this.setState(ol.Tile.State.ERROR);
this.setState(ol.TileState.ERROR);
};
@@ -174,7 +175,7 @@ ol.VectorTile.prototype.onError_ = function() {
*/
ol.VectorTile.prototype.setFeatures = function(features) {
this.features_ = features;
this.setState(ol.Tile.State.LOADED);
this.setState(ol.TileState.LOADED);
};
@@ -189,7 +190,7 @@ ol.VectorTile.prototype.setProjection = function(projection) {
/**
* @param {ol.Tile.State} tileState Tile state.
* @param {ol.TileState} tileState Tile state.
*/
ol.VectorTile.prototype.setState = function(tileState) {
this.state = tileState;