UNPKG

vue-maplibre-gl

Version:
32 lines (31 loc) 1.27 kB
import { DrawMode, DrawModel, DrawPluginOptions, DrawStyle, OnUpdateHandler } from './types.ts'; import { Map } from 'maplibre-gl'; export declare class DrawPlugin { static readonly SOURCE_ID = "mgl-draw-plugin"; static readonly MIN_AREA_PATTERN_ID = "maplibre-draw-min-area-pattern"; map: Map; private _model; private _mode; private _modeInstance; private _source; options: DrawPluginOptions & Required<Pick<DrawPluginOptions, 'styles' | 'pointerPrecision' | 'minArea' | 'circleMode'>>; constructor(map: Map, model: DrawModel | undefined, options?: DrawPluginOptions); get mode(): DrawMode; setMode(value: DrawMode, model?: DrawModel): void; private setupMode; private setupMap; private setupStyles; setStyles(styles: DrawStyle[]): void; setOnUpdate(handler: OnUpdateHandler): void; setModel(model: DrawModel | undefined): void; setMinAreaSize(size: number | undefined): void; setMinAreaColor(color: string | undefined): void; setMinAreaLabel(label: string | undefined): void; zoomToModel(): void; setAutoZoom(autoZoom: boolean): void; private removeStyles; setup(): void; prepareModel(model: DrawModel): DrawModel; private setMinAreaSizePattern; dispose(): void; }