mirror of https://gitee.com/antv-l7/antv-l7
Feat cluster (#950)
* feat: add cluster demo * fix(baselayer): 聚合图共用source 时数据不更新问题 layer 增加cluster zoom 标识符' * fix(source): lint error * fix: 聚合图缩放等级范围设置 * fix: demo * fix: demo lint
This commit is contained in:
parent
fe0fa62a05
commit
af9c72e19a
|
@ -46,12 +46,11 @@ export default class DataSourcePlugin implements ILayerPlugin {
|
|||
// 如果 dataSource 有更新,跳过 zoom 的判断,直接更新一次
|
||||
if (
|
||||
cluster &&
|
||||
(dataSourceNeedUpdate || Math.abs(layer.clusterZoom - newZoom) >= 1) &&
|
||||
maxZoom > layer.clusterZoom
|
||||
(dataSourceNeedUpdate || Math.abs(layer.clusterZoom - newZoom) >= 1)
|
||||
) {
|
||||
// TODO 判断数据是否更新
|
||||
if (zoom !== Math.floor(newZoom)) {
|
||||
source.updateClusterData(Math.round(newZoom));
|
||||
source.updateClusterData(Math.floor(newZoom));
|
||||
}
|
||||
layer.clusterZoom = newZoom;
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue