经纬志
首页 / deck.gl / 使用示例

点击选中

点击任意柱体,选中项单独描边并显示数值,点击空白处取消。

deck.gl 9.0 · 更新 2026-10-27
源码与运行效果
运行效果

说明

点击回调里能拿到 info.object、 info.index 和 info.layer.id。 选中对象放进单独的图层,原始数据不动。

字段含义
info.object原始数据对象
info.index在数据数组中的下标
info.layer.id命中的图层
info.coordinate命中位置的经纬度

点击空白处 info.object 为 null。 不处理这一分支,选中状态就清不掉。