// @ts-ignore import * as Cesium from 'cesium' import { FineArrow } from './arrow/fineArrow' import { PincerArrow } from './arrow/pincerArrow' import { AttackArrow } from './arrow/attackArrow' import { SingleArrow } from './arrow/singleArrow' import { SwallowtailArrow } from './arrow/swallowtailArrow' import { StraightLineArrow } from './arrow/straightLineArrow' import { CurvedLineArrow } from './arrow/curvedLineArrow' import { IconPoint } from './iconPoint' import { CesiumTypes, CreateByDataOptions } from './type' import { Curve } from './polyline/curve' import { FreehandLine } from './polyline/freehandLine' import { Polyline } from './polyline/polyline' import { ArcLine } from './polyline/arcLine' import Polygon from './polygon/polygon' import { Rectangle } from './polygon/rectangle' import { Circle } from './polygon/circle' import { Ellipse } from './polygon/ellipse' import Sector from './polygon/sector' import { FreehandPolygon } from './polygon/freehandPolygon' import { CurvedSurface } from './polygon/curvedSurface' import { ThreeArrow } from './arrow/threeArrow' import { ProfessorPath } from './movePath/professorPath' import { ArmyPath } from './movePath/armyPath' import { CMLDEFPath } from './movePath/CMLDEFPath' import { ElectricPath } from './movePath/electricPath' import { PolicePath } from './movePath/policePath' import { FirefightPath } from './movePath/firefightPath' import { MedicalPath } from './movePath/medicalPath' import { RescuePath } from './movePath/rescuePath' import { EngineeringPath } from './movePath/engineeringPath' import { OilConveyingPipePath } from './dashPolyline' const CesiumSymbol = { IconPoint, FineArrow, PincerArrow, AttackArrow, SingleArrow, SwallowtailArrow, StraightLineArrow, CurvedLineArrow, Curve, FreehandLine, Polyline, ArcLine, Polygon, Rectangle, Circle, Ellipse, Sector, FreehandPolygon, CurvedSurface, ThreeArrow, /* movePath */ ProfessorPath, ArmyPath, CMLDEFPath, ElectricPath, PolicePath, FirefightPath, MedicalPath, RescuePath, EngineeringPath, OilConveyingPipePath, //@ts-ignore createGeometryFromData: (cesium: CesiumTypes, viewer: Cesium.Viewer, options: CreateByDataOptions) => { } } //@ts-ignore CesiumSymbol.createGeometryFromData = (cesium: CesiumTypes, viewer: Cesium.Viewer, options: CreateByDataOptions) => { const { type, style, points } = options; //@ts-ignore const geometry = new CesiumSymbol[type](cesium, viewer, style); geometry.points = points; const geometryPoints = geometry.createGraphic(points); geometry.setGeometryPoints(geometryPoints); if (geometry.type == 'polygon') { geometry.drawPolygon(); } else if (geometry.type == 'polyline') { geometry.drawLine(); } else if (geometry.type == 'point') { geometry.drawPoint(); } geometry.finishDrawing(); geometry.onClick(); return geometry; } export default CesiumSymbol