UNPKG

@geogirafe/lib-geoportal

Version:

GeoGirafe is a flexible application to build online geoportals.

81 lines (80 loc) 3.6 kB
import { Color } from 'vanilla-picker'; import DrawingFeature, { ArrowPosition, ArrowStyle, DrawingShape, MeasureInformation } from '../../tools/drawing/drawingFeature.js'; import DrawingState from '../../tools/drawing/drawingState.js'; import OlDrawing from '../../tools/drawing/olDrawing.js'; import CesiumDrawing from '../../tools/drawing/cesiumDrawing.js'; import GirafeHTMLElement from '../../base/GirafeHTMLElement.js'; import GirafeColorPicker from '../../tools/utils/girafecolorpicker.js'; import LayerDrawing from '../../models/layers/layerdrawing.js'; import IGirafePanel from '../../tools/state/igirafepanel.js'; export declare const DrawingStateLocation = "drawing"; type MeasureInformationForDropown = MeasureInformation & 'mixed'; export default class DrawingComponent extends GirafeHTMLElement implements IGirafePanel { protected templateUrl: string | null; protected styleUrls: string[] | null; template: () => import("uhtml").Hole; isPanelVisible: boolean; panelTitle: string; panelTogglePath: string; checkedIcon: string; noCheckedIcon: string; trashIcon: string; locateIcon: string; visibleIcon: string; notVisibleIcon: string; renderedOnce: boolean; drawingState: DrawingState; colorPickers: [GirafeColorPicker, () => string][]; buttons: { id: string; tool: DrawingShape | null; }[]; toolSelected: Element | null; arrowStyles: Record<ArrowStyle, string>; arrowPositions: Record<ArrowPosition, string>; lineStyles: Record<string, string>; measureInformationsSingle: Record<MeasureInformationForDropown, string>; measureInformationsMultiple: Record<MeasureInformationForDropown, string>; get measureInformations(): {}; get selectedFeatureMeasureInformation(): MeasureInformation | "mixed"; get measureInformationTooltip(): "measure-information-tooltip" | "measure-information-mixed-tooltip"; get haveSameMeasureInformation(): boolean; activeDrawingLayer?: LayerDrawing; defaultLayerName: string; olDrawing: OlDrawing; cesiumDrawing: CesiumDrawing; fixedLengthEnabled: boolean; batchCreateMode: boolean; constructor(name?: string); render(): void; private renderComponent; refreshRender(): void; registerEvents(): void; unregisterEvents(): void; addColorPicker(id: string, set: (c: Color) => unknown, get: () => string): void; setTool(tool?: DrawingShape | null): void; showToolParameters(tool?: DrawingShape | null): void; protected fixedDimensionValueChangedHandler(e: CustomEvent): void; protected connectedCallback(): void; togglePanel(visible: boolean): void; get selectedFeatures(): DrawingFeature[]; deselectAllFeatures(): void; onFeaturesChanged(oldFeatures: DrawingFeature[], newFeatures: DrawingFeature[]): void; onProjectionChanged(oldProj: string, newProj: string): void; protected onToggleBatchMode(): void; onToggleFeatureSelection(feature: DrawingFeature): void; activateLayerInTreeAndMap(layerName?: string): void; deactivateLayerInTreeAnMap(): void; protected getOptionsTitle(): string; protected isDisplayNameEnabled(): boolean; protected isLineStyleEnabled(): boolean; protected isFillColorEnabled(): boolean; deleteFeature(feature: DrawingFeature): Promise<void>; deleteAllFeatures(): Promise<void>; onOptionsChange(): void; onArrowsChange(): void; toggleNameVisibility(): void; private warnWhenInWebMercator; exportSelectedFeatures(format: 'geojson' | 'kml' | 'gpx'): void; } export {};