import { Source } from '@antv/l7'; import EventEmitter from '@antv/event-emitter'; import { LayerType, IPlotLayer, PlotLayerOptions, LayerBlend } from '../../types/layer'; import { Scene, ILayer, ILayerConfig, SourceOptions } from '../../types'; export declare abstract class PlotLayer extends EventEmitter implements IPlotLayer { /** * 地图图表类型 */ static LayerType: typeof LayerType; /** * 图层属性配置项 Keys */ static LayerConfigkeys: string[]; /** * layer 的 schema 配置 */ options: O; /** * layer 上一次的 schema 配置 */ lastOptions: O; /** * layer 实例 */ abstract readonly layer: ILayer; /** * layer 名称 */ abstract readonly name: string; /** * layer 类型 */ abstract readonly type: LayerType | string; /** * layer 是否具有交互效果,用于 tooltip */ abstract readonly interaction: boolean; constructor(options: O); /** * 获取默认配置 */ protected getDefaultOptions(): Partial; pickLayerConfig(params: T): Partial; addTo(scene: Scene): void; remove(scene: Scene): void; /** * 更新 */ update(options: Partial): void; /** * 更新: 更新配置 */ updateOption(options: Partial): void; updateConfig(options: Partial): void; render(): void; protected setSource(source: SourceOptions | Source): void; changeData(source: SourceOptions | Source): void; setIndex(zIndex: number): void; setBlend(blend: LayerBlend): void; setMinZoom(minZoom: number): void; setMaxZoom(maxZoom: number): void; show(): void; hide(): void; toggleVisible(): void; isVisible(): boolean | undefined; fitBounds(fitBoundsOptions?: unknown): void; /** * 事件代理: 绑定事件 */ on(name: string, callback: (...args: any[]) => void): this; /** * 事件代理: 绑定一次事件 */ once(name: string, callback: (...args: any[]) => void): this; /** * 事件代理: 解绑事件 */ off(name: string, callback: (...args: any[]) => void): this; }