remove skipFeature logic

This commit is contained in:
Simon Seyock
2019-09-24 09:31:07 +02:00
parent 3838b68427
commit acac7a9403
12 changed files with 24 additions and 126 deletions

View File

@@ -47,7 +47,6 @@ import {create as createTransform, apply as applyTransform} from './transform.js
* @property {import("./transform.js").Transform} pixelToCoordinateTransform
* @property {Array<PostRenderFunction>} postRenderFunctions
* @property {import("./size.js").Size} size
* @property {!Object<string, boolean>} skippedFeatureUids
* @property {TileQueue} tileQueue
* @property {!Object<string, Object<string, boolean>>} usedTiles
* @property {Array<number>} viewHints
@@ -366,13 +365,6 @@ class PluggableMap extends BaseObject {
this.getTilePriority.bind(this),
this.handleTileChange_.bind(this));
/**
* Uids of features to skip at rendering time.
* @type {Object<string, boolean>}
* @private
*/
this.skippedFeatureUids_ = {};
this.addEventListener(getChangeEventType(MapProperty.LAYERGROUP), this.handleLayerGroupChanged_);
this.addEventListener(getChangeEventType(MapProperty.VIEW), this.handleViewChanged_);
this.addEventListener(getChangeEventType(MapProperty.SIZE), this.handleSizeChanged_);
@@ -1244,7 +1236,6 @@ class PluggableMap extends BaseObject {
pixelToCoordinateTransform: this.pixelToCoordinateTransform_,
postRenderFunctions: [],
size: size,
skippedFeatureUids: this.skippedFeatureUids_,
tileQueue: this.tileQueue_,
time: time,
usedTiles: {},
@@ -1337,14 +1328,6 @@ class PluggableMap extends BaseObject {
this.set(MapProperty.VIEW, view);
}
/**
* @param {import("./Feature.js").default} feature Feature.
*/
skipFeature(feature) {
this.skippedFeatureUids_[getUid(feature)] = true;
this.render();
}
/**
* Force a recalculation of the map viewport size. This should be called when
* third-party code changes the size of the map viewport.
@@ -1371,14 +1354,6 @@ class PluggableMap extends BaseObject {
]);
}
}
/**
* @param {import("./Feature.js").default} feature Feature.
*/
unskipFeature(feature) {
delete this.skippedFeatureUids_[getUid(feature)];
this.render();
}
}