Simplify vector tile code

This commit is contained in:
ahocevar
2018-12-31 00:34:56 +01:00
parent ab797b7160
commit 32696638d2
10 changed files with 396 additions and 462 deletions
+12 -1
View File
@@ -5,6 +5,7 @@ import TileState from './TileState.js';
import {easeIn} from './easing.js';
import EventTarget from './events/Target.js';
import EventType from './events/EventType.js';
import {abstract} from './util.js';
/**
@@ -105,6 +106,14 @@ class Tile extends EventTarget {
*/
this.interimTile = null;
/**
* The tile is available at the highest possible resolution. Subclasses can
* set this to `false` initially. Tile load listeners will not be
* unregistered before this is set to `true` and a `#changed()` is called.
* @type {boolean}
*/
this.hifi = true;
/**
* A key assigned to the tile. This is used by the tile source to determine
* if this tile can effectively be used, or if a new tile should be created
@@ -240,7 +249,9 @@ class Tile extends EventTarget {
* @abstract
* @api
*/
load() {}
load() {
abstract();
}
/**
* Get the alpha value for rendering.