UNPKG

leaflet-polydraw

Version:

Advanced Leaflet plugin for freehand polygon drawing, with smart merging and powerful editing tools. Compatible with both Leaflet v1.x and v2.x.

26 lines 1.11 kB
import { PolygonInfo, PolygonDrawStates } from './polygon-helpers'; import { MapStateService } from './map-state'; import * as L from 'leaflet'; /** * Service for managing polygon information and draw states. */ export declare class PolygonInformationService { mapStateService: MapStateService; private polygonInfoListeners; private polygonDrawStateListeners; polygonInformationStorage: PolygonInfo[]; constructor(mapStateService: MapStateService); onPolygonInfoUpdated(callback: (info: PolygonInfo[]) => void): void; private emitPolygonInfoUpdated; onPolygonDrawStateUpdated(callback: (state: PolygonDrawStates) => void): void; /** * Updates the polygons and notifies the map state service. */ updatePolygons(): void; saveCurrentState(): void; deleteTrashcan(polygon: L.LatLngLiteral[][]): void; deleteTrashCanOnMulti(polygon: L.LatLngLiteral[][][]): void; deletePolygonInformationStorage(): void; createPolygonInformationStorage(arrayOfFeatureGroups: L.FeatureGroup[]): void; } //# sourceMappingURL=polygon-information.service.d.ts.map