UNPKG

@web-map-service/map2d

Version:

基于openlayer的2D地图服务

19 lines (18 loc) 801 B
import { default as OlMap } from 'ol/Map'; import { Emitter } from '../events/emitter'; import { LayerOptions, Layer, Element, ElementType, PointData, CircleData, ElementData } from './layers'; export { type Layer, type Element, type ElementType, type PointData, type CircleData, type ElementData }; export interface LayerManager { create(options?: LayerOptions): Layer; add(layer: Layer): void; remove(layer: Layer): void; clean(): void; destroy(): void; getLayers(): Layer[]; getLayerById(layerId: number): Layer | undefined; } /** * 图层管理器负责图层创建、添加、移除、清空 * 同时也能通过图层id来获取图层、getLayers获取当前全部图层 */ export declare function createLayerManager(olMap: OlMap, emitter: Emitter): LayerManager;