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

View File

@@ -61,12 +61,6 @@ class VectorTile extends Tile {
*/
this.projection_ = null;
/**
* @private
* @type {Object<string, import("./render/canvas/ExecutorGroup.js").default>}
*/
this.executorGroups_ = {};
/**
* @private
* @type {import("./Tile.js").LoadFunction}
@@ -85,10 +79,7 @@ class VectorTile extends Tile {
* @inheritDoc
*/
disposeInternal() {
this.features_ = null;
this.executorGroups_ = {};
this.state = TileState.ABORT;
this.changed();
this.setState(TileState.ABORT);
super.disposeInternal();
}
@@ -137,15 +128,6 @@ class VectorTile extends Tile {
return this.projection_;
}
/**
* @param {string} layerId UID of the layer.
* @param {string} key Key.
* @return {import("./render/canvas/ExecutorGroup.js").default} Executor group.
*/
getExecutorGroup(layerId, key) {
return this.executorGroups_[layerId + ',' + key];
}
/**
* @inheritDoc
*/
@@ -214,15 +196,6 @@ class VectorTile extends Tile {
this.projection_ = projection;
}
/**
* @param {string} layerId UID of the layer.
* @param {string} key Key.
* @param {import("./render/canvas/ExecutorGroup.js").default} executorGroup Executor group.
*/
setExecutorGroup(layerId, key, executorGroup) {
this.executorGroups_[layerId + ',' + key] = executorGroup;
}
/**
* Set the feature loader for reading this tile's features.
* @param {import("./featureloader.js").FeatureLoader} loader Feature loader.