UNPKG

@geogirafe/lib-geoportal

Version:

GeoGirafe is a flexible application to build online geoportals.

50 lines (49 loc) 1.61 kB
import MapComponent from '../../components/map/component.js'; import IGirafeContext from '../context/icontext.js'; export default class CesiumDrawing { private readonly stateLocation; private activeShapePoints; private activeShapes; private floatingPoint; private scene; private handler; private entities; private fixedLineLength; private drawingText; private readonly context; private get state(); private get drawingState(); private get config(); constructor(map: MapComponent, stateLocation: string, context: IGirafeContext); setFixedLineLength(length: number): void; setDrawingText(text: string): void; /** * A text shape displays the text entered in the tool parameters instead of its generated default name. * If no text has been entered, the default name is kept so that the shape stays visible on the globe. */ private getTextOf; private activateTool; private deactivateTool; private pickOnGlobe; private removeLastPointAndTerminateShape; private terminateShape; private fixLastLength; private updateShape; private addPoint; private leveledCenterToMouse; private makeRectangle; private makeRegularPolygon; private getShapes; registerInteractions(): void; unregisterInteractions(): void; private canExecute; private getPosition; private getLength; private createLabel; private createPoint; private getPolygonCenter; private getPolyLineLabels; private getPolygonArea; private getPolyline; private getPolygonEntity; }