UNPKG

@geogirafe/lib-geoportal

Version:

GeoGirafe is a flexible application to build online geoportals.

36 lines (35 loc) 1.78 kB
import * as Cesium from 'cesium'; import { Cartesian2, Cartesian3, Entity } from 'cesium'; import DrawingFeature, { DrawingShape } from './drawingFeature'; import MapComponent from '../map/component'; import UserInteractionManager from '../../tools/state/userInteractionManager'; import State from '../../tools/state/state'; export default class CesiumDrawing { toolName: string; state: State; userInteractionManager: UserInteractionManager; activeShapePoints: Cartesian3[]; activeShapes: Entity[]; floatingPoint: Entity | undefined; scene: Cesium.Scene | undefined; handler: Cesium.ScreenSpaceEventHandler | undefined; entities: Cesium.EntityCollection | undefined; fixedLength: number; constructor(map: MapComponent, toolName: string); setFixedLength(length: number): void; activateTool(tool: DrawingShape): void; deactivateTool(): void; pickOnGlobe(position: Cartesian2): Cesium.Cartesian3 | undefined; removeLastPointAndTerminateShape(tool: DrawingShape): () => void; terminateShape(tool: DrawingShape): void; fixLastLength(tool: DrawingShape, length: number, coord: Cartesian3[]): void; updateShape(tool: DrawingShape): (event: Cesium.ScreenSpaceEventHandler.MotionEvent) => void; addPoint(tool: DrawingShape): (event: Cesium.ScreenSpaceEventHandler.PositionedEvent) => void; leveledCenterToMouse(pos: Cartesian3[]): Cesium.Cartesian3; makeRectangle(pos: Cartesian3[]): Cesium.Cartesian3[]; makeRegularPolygon(center: Cartesian3, firstPosition: Cartesian3, nbEdges: number): Cesium.Cartesian3[]; getShapes(tool: DrawingShape, pos: Cartesian3[], feature: DrawingFeature): Cesium.Entity[]; registerInteractions(): void; unregisterInteractions(): void; private canExecute; }