antvis / L7

🌎 Large-scale WebGL-powered Geospatial Data Visualization analysis engine.

Home Page:https://l7.antv.antgroup.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

G-Device 渲染引擎下,多图层拾取变慢

lvisei opened this issue · comments

问题描述

L7Draw 切换渲染引擎 为 G-Device,绘制多图层,新增点事件反应不及时。

问题原因:

  • 新增点,监听了图层的 unclick 事件,unclick 事件需要走拾取流程,图层上绑定的每一个点击事件,都需要走拾取流程
  • 异步完成拾取流程,如果拾取到数据,抛出 click,抛出 unclick 事件
  • 拾取流程相比 regl 较慢

const isPicked = await this.pickFromPickingFBO(layer, target);

重现链接

https://l7.antv.antgroup.com/examples/draw/control/#amap

@heiyexing

  1. 升级至 V2.21.11-beta.3

  2. 对于不需要高亮/选中的图层,可选择关闭拾取

const layer = new PointLayer({
	enableSelect: false,
	enableHighlight: false,
	enablePicking: false
})
  1. 事件可以绑定到 scence 使用,就不要绑定到 layer