import { Feature, GeoJSON, FeatureCollection, Geometry, Point, Position, BBox } from 'geojson'; export = MapboxDraw; export as namespace MapboxDraw; declare namespace MapboxDraw { type DrawMode = DrawModes[keyof DrawModes]; interface DrawModes { DRAW_LINE_STRING: 'draw_line_string'; DRAW_POLYGON: 'draw_polygon'; DRAW_POINT: 'draw_point'; SIMPLE_SELECT: 'simple_select'; DIRECT_SELECT: 'direct_select'; STATIC: 'static'; DRAW_CIRCLE: 'draw_circle'; DRAW_FINE_ARROW: 'draw_fine_arrow'; DRAW_ELLIPSE: 'draw_ellipse'; DRAW_RECTABGLE: 'draw_rectangle'; DRAW_ASSAULT_DIRECTION: 'draw_assault_direction'; DRAW_DOUBLE_ARROW: 'draw_double_arrow'; DRAW_SECTOR: 'draw_sector'; DRAW_LUNE: 'draw_lune'; DRAW_ATTACK_ARROW: 'draw_attack_arrow'; DRAW_TRAILED_ATTACK_ARROW: 'draw_tailed_attack_arrow'; DRAW_SQUAD_COMBAT: 'draw_squad_combat'; DRAW_CLOSED_CURVE: 'draw_closed_curve'; DRAW_CURVE: 'draw_curve'; DRAW_ARC: 'draw_arc'; DRAW_TEXT: 'draw_text'; DRAW_IMAGE: 'draw_image'; } } declare class MapboxDraw { static modes: MapboxDraw.DrawModes; ctx: { options: Record ui: { addButtons: () => HTMLElement; removeButtons: () => void; } }; constructor(map:any,options?) add(geojson: Feature | FeatureCollection | Geometry): string[]; get(featureId: string): Feature | undefined; getFeatureIdsAt(point: { x: number; y: number }): string[]; getSelectedIds(): string[]; getSelected(): FeatureCollection; getSelectedPoints(): FeatureCollection; getAll(): FeatureCollection; delete(ids: string | string[]): this; deleteAll(): this; set(featureCollection: FeatureCollection): string[]; trash(): this; combineFeatures(): this; uncombineFeatures(): this; getMode(): MapboxDraw.DrawMode; changeMode(mode: 'simple_select', options?: { featureIds: string[] }): this; changeMode(mode: 'direct_select', options: { featureId: string }): this; changeMode( mode: 'draw_line_string', options?: { featureId: string; from: Feature | Point | number[] }, ): this; changeMode(mode: 'draw_image', options: { imageId: string,imageUrl: string }): this; changeMode(mode: Exclude, options?: Record): this; setFeatureProperty(featureId: string, property: string, value: any): this; onAdd(map: any): HTMLElement; onRemove(map: any): any; destroy(): void; }