Merge pull request #11592 from ahocevar/new-declutter

New decluttering implementation
This commit is contained in:
Andreas Hocevar
2020-10-07 10:33:33 +02:00
committed by GitHub
27 changed files with 889 additions and 808 deletions

View File

@@ -50,8 +50,8 @@ import {removeNode} from './dom.js';
* @property {import("./View.js").State} viewState The state of the current view.
* @property {boolean} animate
* @property {import("./transform.js").Transform} coordinateToPixelTransform
* @property {import("rbush").default} declutterTree
* @property {null|import("./extent.js").Extent} extent
* @property {Array<DeclutterItems>} declutterItems
* @property {number} index
* @property {Array<import("./layer/Layer.js").State>} layerStatesArray
* @property {number} layerIndex
@@ -64,12 +64,6 @@ import {removeNode} from './dom.js';
* @property {!Object<string, Object<string, boolean>>} wantedTiles
*/
/**
* @typedef {Object} DeclutterItems
* @property {Array<*>} items Declutter items of an executor.
* @property {number} opacity Layer opacity.
*/
/**
* @typedef {function(PluggableMap, ?FrameState): any} PostRenderFunction
*/
@@ -1387,9 +1381,7 @@ class PluggableMap extends BaseObject {
frameState = {
animate: false,
coordinateToPixelTransform: this.coordinateToPixelTransform_,
declutterItems: previousFrameState
? previousFrameState.declutterItems
: [],
declutterTree: null,
extent: getForViewAndSize(
viewState.center,
viewState.resolution,