UNPKG

bcgis-type

Version:

The SDK is based on Cesium for secondary development of 2, 3D all-in-one WebGis application framework, the framework optimizes the use of Cesium and add some additional features, designed for developers to quickly build WebGis applications.

86 lines (85 loc) 1.93 kB
import Layer from "../Layer"; interface ClusterLayerOptions { size: number; pixelRange: number; gradient: { 0.0001: any; 0.001: any; 0.01: any; 0.1: any; }; fontSize: number; fontColor: Cesium.Color; style: string; } /** * 聚合图层 * @noInheritDoc * @example * ```ts * let layer = new BC.ClusterLayer('id') * viewer.addLayer(layer) * ``` */ declare class ClusterLayer extends Layer { _cache: any; private _options; protected _delegate: Cesium.CustomDataSource; /** * @param id ID * @param options 聚合图层选项 * @example * ```ts * // 属性参数(可选) { "size": 48, //聚合的尺寸 "pixelRange": 40, //像素范围 "gradient": { "0.0001": BC.Color.DEEPSKYBLUE, "0.001": BC.Color.GREEN, "0.01": BC.Color.ORANGE, "0.1": BC.Color.RED }, // 幅度颜色设置 "style": "circle", // circle 和 clustering "fontSize": 12, // 字体大小 "fontColor": BC.Color.BLACK // 字体颜色 } * ``` */ constructor(id: string, options?: ClusterLayerOptions); /** * 项目类型 */ get type(): string; /** * 是否聚合 */ set enableCluster(enableCluster: boolean); /** * 绘制圆 * @param color 颜色 * @param numLength * @returns {*} * @private */ private _drawCircle; /** * 绘制聚合 * @param color * @param numLength * @returns {*} */ private _drawClustering; /** * 聚合事件句柄 * @param {*} clusteredEntities * @param {*} cluster */ private _clusterEventHandler; /** * 清空聚合图层 */ clear(): this; setStyle(style: any): void; } export default ClusterLayer;