Socket
Book a DemoInstallSign in
Socket

@bmapgl-plugin/cluster

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bmapgl-plugin/cluster

基于百度地图GL API实现地理点聚合能力,用于展示海量点标记。支持将地理点数据按照距离、属性、地理围栏进行聚合,以提高地图绘制性能。

0.0.9
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
Source

@bmapgl-plugin/cluster

简介

  • 基于百度地图GL SDK,提供地图点数据聚合能力
  • 支持将地理点数据按照距离进行聚合以及属性约束能力
  • 支持将地理点数据按属性进行聚合
  • 支持将地理点数据按地理围栏进行聚合
  • 支持多种聚合点的权重计算方式以及坐标点计算方式
  • 提供地图非聚合点和聚合点样式自定义能力
  • 提供基础事件交互能力
  • 支持聚合分散过程动画

下载安装

npm install @bmapgl-plugin/cluster

使用示例

// 引入
import Cluster from '@bmapgl-plugin/cluster';

// 创建地图
const map = new BMapGL.Map('container');
map.centerAndZoom(new BMapGL.Point(116.418, 39.918), 16);
map.enableScrollWheelZoom(true);

// 创建聚合对象
const cluster = new Cluster.View(map);
// 设置数据
const points: Cluster.TGeoPoints = [];
cluster.setData(points);
// 监听事件
cluster.on(Cluster.ClusterEvent.CLICK, (e: Cluster.ClusterElement) => {
    console.log('ClusterEvent.CLICK', e);
});
cluster.on(Cluster.ClusterEvent.MOUSE_OVER, (e: Cluster.ClusterElement) => {
    console.log('ClusterEvent.MOUSEOVER', e);
});
cluster.on(Cluster.ClusterEvent.MOUSE_OUT, (e: Cluster.ClusterElement) => {
    console.log('ClusterEvent.MOUSEOUT', e);
});

依赖

  • 百度地图PC端GL SDK地图能力

Keywords

百度地图点聚合

FAQs

Package last updated on 15 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.