ino-cesium 0.0.16-beta.3 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -518,14 +518,21 @@ declare abstract class BasePrimitive<T> {
518
518
  protected appearance: Cesium.Appearance | undefined;
519
519
  protected geometryInstance: Cesium.Appearance | undefined;
520
520
  protected drawCommand: any;
521
+ /**
522
+ * 组成primitive的position
523
+ * @protected
524
+ */
525
+ protected shapePositions: Cesium.Cartesian3[];
521
526
  needUpdate: boolean;
522
527
  constructor();
523
528
  update(frameState: any): void;
524
529
  then(onFulfilled?: any): Promise<T>;
525
530
  catch(onRejected?: any): Promise<T>;
526
531
  abstract getPrimitive(): CusPrimitive;
532
+ abstract calcShapePositions(positions: Cesium.Cartesian3[]): void;
527
533
  isDestroyed(): boolean;
528
534
  destroy(): void;
535
+ setShapePositions(positions: Cesium.Cartesian3[]): void;
529
536
  }
530
537
  type CusPrimitive = Cesium.Primitive | Cesium.GroundPrimitive | Cesium.PointPrimitiveCollection | Cesium.GroundPolylinePrimitive | Cesium.LabelCollection | Cesium.PrimitiveCollection | undefined;
531
538
 
@@ -1131,6 +1138,7 @@ declare class MeasurePrimitive extends BasePrimitive<any> {
1131
1138
  setAppearance(): void;
1132
1139
  clearAllDiv(): void;
1133
1140
  createDiv(key: string, text: string, height?: number): HTMLDivElement;
1141
+ calcShapePositions(positions: Cesium.Cartesian3[]): void;
1134
1142
  }
1135
1143
 
1136
1144
  /**
@@ -1315,6 +1323,10 @@ interface IDrawHandler {
1315
1323
  * 移除所有方法
1316
1324
  */
1317
1325
  removeAll: () => void;
1326
+ /**
1327
+ * 移除正在绘制或编辑的操作
1328
+ */
1329
+ removeEditing: () => void;
1318
1330
  /**
1319
1331
  * 更新测量单位方法
1320
1332
  * @param drawData 绘制属性信息
@@ -1330,11 +1342,23 @@ interface IDrawHandler {
1330
1342
  * 事件处理器
1331
1343
  */
1332
1344
  Event: IDrawHandlerEvent;
1345
+ /**
1346
+ * 回显某个绘制数据
1347
+ */
1348
+ reShowDrawData: (reShowOptions: IReShowOptions) => void;
1349
+ /**
1350
+ * 回显多个绘制数据
1351
+ */
1352
+ reShowDrawDatas: (reShowOptions: IReShowOptions[]) => void;
1333
1353
  }
1334
1354
  /**
1335
1355
  * 绘制选项接口
1336
1356
  */
1337
1357
  interface IDrawOptions {
1358
+ /**
1359
+ * 绘制id, 如果为空则自动生成
1360
+ */
1361
+ id?: string;
1338
1362
  /**
1339
1363
  * 绘制形状
1340
1364
  */
@@ -1368,6 +1392,34 @@ interface IDrawOptions {
1368
1392
  */
1369
1393
  drawStyle?: DeepPartial<IDrawStyle>;
1370
1394
  }
1395
+ interface IReShowOptions {
1396
+ id: string;
1397
+ positions: Cesium.Cartesian3[];
1398
+ /**
1399
+ * 绘制形状
1400
+ */
1401
+ shape: DrawShape;
1402
+ /**
1403
+ * 是否可编辑
1404
+ */
1405
+ edit?: boolean;
1406
+ /**
1407
+ * 是否测量
1408
+ */
1409
+ measure?: boolean;
1410
+ /**
1411
+ * 测量单位数组
1412
+ */
1413
+ measureUnit?: string[];
1414
+ /**
1415
+ * 是否显示测量标签
1416
+ */
1417
+ measureLabel?: boolean;
1418
+ /**
1419
+ * 是否贴地
1420
+ */
1421
+ clampToGround?: boolean;
1422
+ }
1371
1423
  /**
1372
1424
  * 测量选项接口
1373
1425
  */
@@ -1438,7 +1490,7 @@ interface IMeasureResult {
1438
1490
  /**
1439
1491
  * 绘制形状类型
1440
1492
  */
1441
- type DrawShape = 'polyline' | 'polygon' | 'point' | 'circle' | 'rectangle' | 'vertical-line' | 'vertical-surface-line';
1493
+ type DrawShape = 'polyline' | 'polyline-arrow' | 'polygon' | 'point' | 'circle' | 'rectangle' | 'vertical-line' | 'vertical-surface-line' | 'curve' | 'curve-arrow' | string;
1442
1494
  /**
1443
1495
  * 绘制样式接口
1444
1496
  */
@@ -1514,9 +1566,27 @@ type types$3_IEventActions = IEventActions;
1514
1566
  type types$3_IEventData = IEventData;
1515
1567
  type types$3_IMeasureOptions = IMeasureOptions;
1516
1568
  type types$3_IMeasureResult = IMeasureResult;
1569
+ type types$3_IReShowOptions = IReShowOptions;
1517
1570
  declare namespace types$3 {
1518
1571
  export { types$3_DrawEventType as DrawEventType };
1519
- export type { types$3_DrawEvent as DrawEvent, types$3_DrawShape as DrawShape, types$3_IDrawAttrInfo as IDrawAttrInfo, types$3_IDrawEditEvent as IDrawEditEvent, types$3_IDrawHandler as IDrawHandler, types$3_IDrawHandlerEvent as IDrawHandlerEvent, types$3_IDrawOptions as IDrawOptions, types$3_IDrawStyle as IDrawStyle, types$3_IEventActions as IEventActions, types$3_IEventData as IEventData, types$3_IMeasureOptions as IMeasureOptions, types$3_IMeasureResult as IMeasureResult };
1572
+ export type { types$3_DrawEvent as DrawEvent, types$3_DrawShape as DrawShape, types$3_IDrawAttrInfo as IDrawAttrInfo, types$3_IDrawEditEvent as IDrawEditEvent, types$3_IDrawHandler as IDrawHandler, types$3_IDrawHandlerEvent as IDrawHandlerEvent, types$3_IDrawOptions as IDrawOptions, types$3_IDrawStyle as IDrawStyle, types$3_IEventActions as IEventActions, types$3_IEventData as IEventData, types$3_IMeasureOptions as IMeasureOptions, types$3_IMeasureResult as IMeasureResult, types$3_IReShowOptions as IReShowOptions };
1573
+ }
1574
+
1575
+ declare const DrawStyle: IDrawStyle;
1576
+
1577
+ /**
1578
+ * 扩展绘制
1579
+ * @param options.type 类型
1580
+ * @param options.action 调用函数
1581
+ * @param options.outline 是否使用shapepositions连接边线
1582
+ * @param options.pointCount 点数量 绘制图形需要固定的点数
1583
+ */
1584
+ declare const addDrawActions: (options: IAddDrawActionsOptions) => void;
1585
+ interface IAddDrawActionsOptions {
1586
+ type: string;
1587
+ action: any;
1588
+ outline?: boolean;
1589
+ pointCount?: number;
1520
1590
  }
1521
1591
 
1522
1592
  /**
@@ -2627,5 +2697,5 @@ declare const createProfileAnalysis: (viewer: Cesium.Viewer) => IProFile<IProFil
2627
2697
  */
2628
2698
  declare const createModelProfileAnalysis: (viewer: Viewer) => IProFile<IModelProFileOptions>;
2629
2699
 
2630
- export { types as Analysis, BaseMaterialProperty, BasePrimitive, CircleApertureMaterialProperty, CircleAperturePrimitive, CircleRaderFanMaterialProperty, CircleRaderWaveMaterialProperty, CircleWaveMaterialProperty, types$4 as Common, CoordinateTransformer, DefaultViewerOptions, types$3 as Draw, DrawEventType, EllipsoidElectricMaterialProperty, EllipsoidScanMaterialProperty, FlyAttitude, GridPrimitives, GroundPolygonPrimitives, GroundPolylinePrimitives, LightWallMaterialProperty, types$2 as Material, PointClusterPrimitives, PointPrimitives, PolylineFlowMaterialProperty, PolylineTrailMaterialProperty, Popup, types$1 as Primitives, RadereScanPrimitive, RoamStatus, Tooltip, TransformsFor3dtiles, ZapsMaterialProperty, calcArea, calcCameraHeightFromZoom, calcGeodesicDistance, calcGeodesicDistances, calcLerpPosition, calcPoistionCenter, calcSceneHeightFromPositions, calcSpaceDistance, calcSpaceDistances, calcTerrainHeightFromPositions, calcTriangleArea, calcZoomFromCameraHeight, clacPositionsForParabola, createBloomTargetStage, createBottomStatusBar, createCircleApertureMaterial, createCircleRaderFanMaterial, createCircleWaveMaterial, createClipPlaneAnalysis, createClipPolygonAnalysis, createDrawHandler, createDroneAnimCustomShader, createEagleEye, createEllipsoidElectricMaterial, createEllipsoidScanMaterial, createFillAndDigAnalysis, createFloodAnalysis, createFogStage, createHeightFogStage, createHighLightStage, createLightBandCustomShader, createLightWallMaterial, createLightningStage, createModelProfileAnalysis, createOpenAnim, createOutLineEffect, createOutlineStage, createPoylineFlowMaterial, createProfileAnalysis, createRaderWaveMaterial, createRainCoverStage, createRainStage, createRoamHandler, createScanRadarMaterial, createSkyBox, createSkyBoxOnGround, createSkylineStage, createSnowCoverStage, createSnowStage, createTrailMaterial, createZapsMaterial, flyToCameraView, flyToCesium3DTile, flyToDataSource, flyToFromSphere, flyToImagery, flyToLnglat, flyToPosition, getAllFeaturesFrom3dTiles, getAllTilesFrom3dTiles, getCameraView, getCesiumForAutoFitScale, getInoCesiumBaseUrl, initCesium, initCesiumEvent, load3dTiles, loadI3s, loadModel, loadTerrain, loadTerrainFromCesium, loadTianDiTu, loads3m, makeGridFromElevationExtrema, makeGridToInstanceForBox, makeGridToInstanceForLine, makeLnglatToPosition, makeLnglatsToLineGeojson, makeLnglatsToPointGeojson, makeLnglatsToPolygonGeojson, makeLnglatsToPositions, makePositionsClose, makePositionsForAntiClockwise, makePositionsForClockwise, makePositionsToLnglats, makePositiontoLnglat, makeYawPitchRollToHeadingPitchRoll, mekeGridPolygonAndHeight, numberId, randomColor, randomPointToGeoJson, randomPolygonToGeoJson, randomPolylineToGeoJson, removeTerrain, setCesiumForAutoFitScale, setGlobeOpatity, setHeightOffsetFor3dTiles, setInoCesiumBaseUrl, setViewToLnglat, twinkleModel };
2631
- export type { DeepPartial, DrawEvent, DrawShape, IBaseAnalysis, IBillboard, ICamearView, ICesiumEventListener, ICircleApertureMaterialOptions, ICircleAperturePrimitiveOptions, ICircleRaderFanMaterialOptions, ICircleRaderWaveMaterialOptions, ICircleWaveMaterialOptions, IClipPlane, IClipPlaneOPtions, IClipPolygon, IClipPolygonItem, IClipPolygonPtions, ICorridorMaterialOptions, IDrawAttrInfo, IDrawEditEvent, IDrawHandler, IDrawHandlerEvent, IDrawOptions, IDrawStyle, IDroneAnimOptions, IEllipsoidElectricMaterialOptions, IEllipsoidScanMaterialOptions, IEventActions, IEventData, IFillDig, IFillDigItem, IFillDigOptions, IFlood, IFloodItem, IFloodOptions, IFogStageOptions, IGroundPolygonPrimitivesOptions, IGroundPolylinePrimitivesOptions, IHeightFogStageOptions, IHighLightStageOptions, ILabel, ILightBandStageOptions, ILightWallMaterialOptions, ILightningStageOptions, ILoadTerrainOptions, ILoadTiandituOptions, IMeasureOptions, IMeasureResult, IModelProFileOptions, IOpenAnimOptions, IPoint, IPointPrimitivesOptions, IPolylineFlowMaterialOptions, IPolylineTrailMaterialOptions, IProFile, IProFileItem, IProFileItemData, IProFileOptions, IRadarScanMaterialOptions, IRaderScanPrimitiveOptions, IRainCoverStage, IRainStageOptions, IRoamEvent, IRoamHandler, IRoamItem, IRoamItemHPR, IRoaming, ISetViewByLngLatOptions, ISetViewByPositionOptions, ISkyBoxOnGroundOptions, ISkyBoxOptions, ISkyBoxSources, ISnowCoverStageOptions, ISnowStageOptions, IYawPitchRoll, IZapsMaterialOptions, Icluster };
2700
+ export { types as Analysis, BaseMaterialProperty, BasePrimitive, CircleApertureMaterialProperty, CircleAperturePrimitive, CircleRaderFanMaterialProperty, CircleRaderWaveMaterialProperty, CircleWaveMaterialProperty, types$4 as Common, CoordinateTransformer, DefaultViewerOptions, types$3 as Draw, DrawEventType, DrawStyle, EllipsoidElectricMaterialProperty, EllipsoidScanMaterialProperty, FlyAttitude, GridPrimitives, GroundPolygonPrimitives, GroundPolylinePrimitives, LightWallMaterialProperty, types$2 as Material, PointClusterPrimitives, PointPrimitives, PolylineFlowMaterialProperty, PolylineTrailMaterialProperty, Popup, types$1 as Primitives, RadereScanPrimitive, RoamStatus, Tooltip, TransformsFor3dtiles, ZapsMaterialProperty, addDrawActions, calcArea, calcCameraHeightFromZoom, calcGeodesicDistance, calcGeodesicDistances, calcLerpPosition, calcPoistionCenter, calcSceneHeightFromPositions, calcSpaceDistance, calcSpaceDistances, calcTerrainHeightFromPositions, calcTriangleArea, calcZoomFromCameraHeight, clacPositionsForParabola, createBloomTargetStage, createBottomStatusBar, createCircleApertureMaterial, createCircleRaderFanMaterial, createCircleWaveMaterial, createClipPlaneAnalysis, createClipPolygonAnalysis, createDrawHandler, createDroneAnimCustomShader, createEagleEye, createEllipsoidElectricMaterial, createEllipsoidScanMaterial, createFillAndDigAnalysis, createFloodAnalysis, createFogStage, createHeightFogStage, createHighLightStage, createLightBandCustomShader, createLightWallMaterial, createLightningStage, createModelProfileAnalysis, createOpenAnim, createOutLineEffect, createOutlineStage, createPoylineFlowMaterial, createProfileAnalysis, createRaderWaveMaterial, createRainCoverStage, createRainStage, createRoamHandler, createScanRadarMaterial, createSkyBox, createSkyBoxOnGround, createSkylineStage, createSnowCoverStage, createSnowStage, createTrailMaterial, createZapsMaterial, flyToCameraView, flyToCesium3DTile, flyToDataSource, flyToFromSphere, flyToImagery, flyToLnglat, flyToPosition, getAllFeaturesFrom3dTiles, getAllTilesFrom3dTiles, getCameraView, getCesiumForAutoFitScale, getInoCesiumBaseUrl, initCesium, initCesiumEvent, load3dTiles, loadI3s, loadModel, loadTerrain, loadTerrainFromCesium, loadTianDiTu, loads3m, makeGridFromElevationExtrema, makeGridToInstanceForBox, makeGridToInstanceForLine, makeLnglatToPosition, makeLnglatsToLineGeojson, makeLnglatsToPointGeojson, makeLnglatsToPolygonGeojson, makeLnglatsToPositions, makePositionsClose, makePositionsForAntiClockwise, makePositionsForClockwise, makePositionsToLnglats, makePositiontoLnglat, makeYawPitchRollToHeadingPitchRoll, mekeGridPolygonAndHeight, numberId, randomColor, randomPointToGeoJson, randomPolygonToGeoJson, randomPolylineToGeoJson, removeTerrain, setCesiumForAutoFitScale, setGlobeOpatity, setHeightOffsetFor3dTiles, setInoCesiumBaseUrl, setViewToLnglat, twinkleModel };
2701
+ export type { DeepPartial, DrawEvent, DrawShape, IBaseAnalysis, IBillboard, ICamearView, ICesiumEventListener, ICircleApertureMaterialOptions, ICircleAperturePrimitiveOptions, ICircleRaderFanMaterialOptions, ICircleRaderWaveMaterialOptions, ICircleWaveMaterialOptions, IClipPlane, IClipPlaneOPtions, IClipPolygon, IClipPolygonItem, IClipPolygonPtions, ICorridorMaterialOptions, IDrawAttrInfo, IDrawEditEvent, IDrawHandler, IDrawHandlerEvent, IDrawOptions, IDrawStyle, IDroneAnimOptions, IEllipsoidElectricMaterialOptions, IEllipsoidScanMaterialOptions, IEventActions, IEventData, IFillDig, IFillDigItem, IFillDigOptions, IFlood, IFloodItem, IFloodOptions, IFogStageOptions, IGroundPolygonPrimitivesOptions, IGroundPolylinePrimitivesOptions, IHeightFogStageOptions, IHighLightStageOptions, ILabel, ILightBandStageOptions, ILightWallMaterialOptions, ILightningStageOptions, ILoadTerrainOptions, ILoadTiandituOptions, IMeasureOptions, IMeasureResult, IModelProFileOptions, IOpenAnimOptions, IPoint, IPointPrimitivesOptions, IPolylineFlowMaterialOptions, IPolylineTrailMaterialOptions, IProFile, IProFileItem, IProFileItemData, IProFileOptions, IRadarScanMaterialOptions, IRaderScanPrimitiveOptions, IRainCoverStage, IRainStageOptions, IReShowOptions, IRoamEvent, IRoamHandler, IRoamItem, IRoamItemHPR, IRoaming, ISetViewByLngLatOptions, ISetViewByPositionOptions, ISkyBoxOnGroundOptions, ISkyBoxOptions, ISkyBoxSources, ISnowCoverStageOptions, ISnowStageOptions, IYawPitchRoll, IZapsMaterialOptions, Icluster };