@ino-cesium/common 0.0.8 → 0.0.10

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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as Cesium from 'cesium';
2
- import { Cartesian3, Viewer, Cesium3DTileFeature, ImageryLayer, Cesium3DTileset, Cartesian2, Cartographic, SkyBox, Entity, SampledPositionProperty, JulianDate } from 'cesium';
2
+ import { Cartesian3, Viewer, ImageryLayer, Cesium3DTileset, Cartesian2, Cartographic, SkyBox, Entity, SampledPositionProperty, JulianDate } from 'cesium';
3
3
  import { FeatureCollection, Point, GeoJsonProperties, LineString, Polygon } from 'geojson';
4
4
 
5
5
  interface ISetViewByLngLatOptions {
@@ -24,8 +24,8 @@ interface ICesiumEventListener {
24
24
  LEFT_CLICK?: (e: any) => void;
25
25
  LEFT_POSITION?: (e: any) => void;
26
26
  MOVE_POSITION?: (e: any) => void;
27
- PICK_FEATURE?: (pickModel: Cesium3DTileFeature, feature: any) => void;
28
- MOVE_PICK_FEATURE?: (pickModel: Cesium3DTileFeature, feature: any) => void;
27
+ PICK_FEATURE?: (pickModel: any, feature: any) => void;
28
+ MOVE_PICK_FEATURE?: (pickModel: any, feature: any) => void;
29
29
  }
30
30
  type DeepPartial<T> = {
31
31
  [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
@@ -79,7 +79,9 @@ declare const initCesium: (eleId: string, options?: Viewer.ConstructorOptions &
79
79
  * @param value 0-1
80
80
  * @param viewer
81
81
  */
82
- declare const changeGlobeOpatity: (value: number, viewer: Viewer) => void;
82
+ declare const setGlobeOpatity: (value: number, viewer: Viewer) => void;
83
+ declare const setCesiumForAutoFitScale: (value: number) => void;
84
+ declare const getCesiumForAutoFitScale: () => number;
83
85
  declare const DefaultViewerOptions: Viewer.ConstructorOptions;
84
86
 
85
87
  /**
@@ -175,14 +177,14 @@ declare const initCesiumEvent: (viewer: Viewer, eventListener: ICesiumEventListe
175
177
  declare const numberId: () => string;
176
178
 
177
179
  declare class Tooltip {
178
- static tootlip: Tooltip | null;
180
+ static tooltip: Tooltip | null;
179
181
  private _title;
180
182
  private _div;
181
183
  private _message;
182
- constructor(frameDiv: HTMLElement);
184
+ constructor(viewer: Viewer);
183
185
  showAt(position: Cartesian2, message: string): void;
184
186
  setVisible(visible: boolean): void;
185
- static createToolTip(): Tooltip;
187
+ static createToolTip(viewer: Viewer): Tooltip;
186
188
  destroy(): void;
187
189
  }
188
190
 
@@ -304,6 +306,16 @@ declare const calcCameraHeightFromZoom: (zoom: number) => number;
304
306
  * @returns Cartesian3[]
305
307
  */
306
308
  declare const calcLerpPosition: (positions: Cesium.Cartesian3[], number: number) => Cesium.Cartesian3[];
309
+ /**
310
+ * @deprecated 气泡无需自适应
311
+ * @param viewer
312
+ * @param position
313
+ * @param offSet
314
+ */
315
+ declare const calcScreenPositionFromPosition: (viewer: Cesium.Viewer, position: Cesium.Cartesian3, offSet?: Cartesian2) => {
316
+ x: string;
317
+ y: string;
318
+ };
307
319
 
308
320
  declare abstract class BasePrimitive<T> {
309
321
  protected _primitive: CusPrimitive;
@@ -572,5 +584,36 @@ interface IOpenAnimOptions {
572
584
  };
573
585
  }
574
586
 
575
- export { BaseMaterialProperty, BasePrimitive, types as Common, DefaultViewerOptions, FlyAttitude, Popup, RoamStatus, Tooltip, calcArea, calcCameraHeightFromZoom, calcGeodesicDistance, calcGeodesicDistances, calcLerpPosition, calcPoistionCenter, calcSpaceDistance, calcSpaceDistances, calcTerrainHeightFromPositions, calcTriangleArea, calcZoomFromCameraHeight, changeGlobeOpatity, clacPositionsForParabola, createBottomStatusBar, createEagleEye, createOpenAnim, createRoamHandler, createSkyBox, createSkyBoxOnGround, flyToCameraView, flyToCesium3DTile, flyToDataSource, flyToFromSphere, flyToImagery, flyToLnglat, flyToPosition, getCameraView, initCesium, initCesiumEvent, makeLnglatToPosition, makeLnglatsToLineGeojson, makeLnglatsToPointGeojson, makeLnglatsToPolygonGeojson, makeLnglatsToPositions, makePositionsClose, makePositionsForAntiClockwise, makePositionsForClockwise, makePositionsToLnglats, makePositiontoLnglat, makeYawPitchRollToHeadingPitchRoll, numberId, randomColor, randomPointToGeoJson, randomPolygonToGeoJson, randomPolylineToGeoJson, setViewToLnglat, twinkleModel };
587
+ /**
588
+ * 网格8个顶点生成盒子面
589
+ * @param cartesianVertices 8个顶点
590
+ * @param color 网格颜色
591
+ * @param gridId 网格id
592
+ */
593
+ declare const makeGridToInstanceForBox: (cartesianVertices: any, color: Cesium.Color, gridId: string) => Cesium.GeometryInstance;
594
+ /**
595
+ * 网格8个顶点生成盒子边线
596
+ * @param cartesianVertices 8个顶点
597
+ * @param color 网格颜色
598
+ * @param gridId 网格id
599
+ */
600
+ declare const makeGridToInstanceForLine: (cartesianVertices: any, color: Cesium.Color, gridId: string) => Cesium.GeometryInstance;
601
+ /**
602
+ * 使用顶点极值创建盒子的八个点
603
+ * @param maxPoint
604
+ * @param minPoint
605
+ */
606
+ declare const makeGridFromElevationExtrema: (maxPoint: Cartographic, minPoint: Cartographic) => Cartesian3[];
607
+ /**
608
+ * 使用底面和高度创建网格
609
+ * @param topLeft
610
+ * @param topRight
611
+ * @param bottomRight
612
+ * @param bottomLeft
613
+ * @param minHeight
614
+ * @param maxHeight
615
+ */
616
+ declare const mekeGridPolygonAndHeight: (topLeft: number, topRight: number, bottomRight: number, bottomLeft: number, minHeight: number, maxHeight: number) => Cartesian3[];
617
+
618
+ export { BaseMaterialProperty, BasePrimitive, types as Common, DefaultViewerOptions, FlyAttitude, Popup, RoamStatus, Tooltip, calcArea, calcCameraHeightFromZoom, calcGeodesicDistance, calcGeodesicDistances, calcLerpPosition, calcPoistionCenter, calcScreenPositionFromPosition, calcSpaceDistance, calcSpaceDistances, calcTerrainHeightFromPositions, calcTriangleArea, calcZoomFromCameraHeight, clacPositionsForParabola, createBottomStatusBar, createEagleEye, createOpenAnim, createRoamHandler, createSkyBox, createSkyBoxOnGround, flyToCameraView, flyToCesium3DTile, flyToDataSource, flyToFromSphere, flyToImagery, flyToLnglat, flyToPosition, getCameraView, getCesiumForAutoFitScale, initCesium, initCesiumEvent, makeGridFromElevationExtrema, makeGridToInstanceForBox, makeGridToInstanceForLine, makeLnglatToPosition, makeLnglatsToLineGeojson, makeLnglatsToPointGeojson, makeLnglatsToPolygonGeojson, makeLnglatsToPositions, makePositionsClose, makePositionsForAntiClockwise, makePositionsForClockwise, makePositionsToLnglats, makePositiontoLnglat, makeYawPitchRollToHeadingPitchRoll, mekeGridPolygonAndHeight, numberId, randomColor, randomPointToGeoJson, randomPolygonToGeoJson, randomPolylineToGeoJson, setCesiumForAutoFitScale, setGlobeOpatity, setViewToLnglat, twinkleModel };
576
619
  export type { IOpenAnimOptions, IRoamEvent, IRoamHandler, IRoamItem, IRoamItemHPR, IRoaming };