@xingm/vmap-cesium-toolbar 0.0.1 → 0.0.2-alpha.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.
Files changed (45) hide show
  1. package/dist/hooks/toolBarConfig.d.ts +6 -3
  2. package/dist/hooks/useDrawHelper.d.ts +65 -0
  3. package/dist/hooks/useHeatmapHelper.d.ts +34 -0
  4. package/dist/hooks/useOverlayHelper.d.ts +212 -0
  5. package/dist/index.d.ts +664 -36
  6. package/dist/index.js +5078 -1840
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.umd.js +215 -128
  9. package/dist/index.umd.js.map +1 -1
  10. package/dist/libs/CesiumHeatmapLayer.d.ts +109 -0
  11. package/dist/libs/{CesiumMapHelper.d.ts → CesiumMapDraw.d.ts} +34 -51
  12. package/dist/libs/CesiumMapLoader.d.ts +11 -2
  13. package/dist/libs/CesiumMapModel.d.ts +5 -2
  14. package/dist/libs/CesiumMapToolbar.d.ts +23 -67
  15. package/dist/libs/CesiumOverlayService.d.ts +117 -0
  16. package/dist/libs/{CesiumMapConfig.d.ts → config/CesiumMapConfig.d.ts} +3 -3
  17. package/dist/libs/drawHelper/BaseDraw.d.ts +170 -0
  18. package/dist/libs/drawHelper/DrawCircle.d.ts +30 -0
  19. package/dist/libs/drawHelper/DrawLine.d.ts +44 -0
  20. package/dist/libs/drawHelper/DrawPolgon.d.ts +29 -0
  21. package/dist/libs/drawHelper/DrawRectangle.d.ts +24 -0
  22. package/dist/libs/drawHelper/index.d.ts +5 -0
  23. package/dist/libs/overlay/MapCircle.d.ts +64 -0
  24. package/dist/libs/overlay/MapIcon.d.ts +59 -0
  25. package/dist/libs/overlay/MapInfoWindow.d.ts +100 -0
  26. package/dist/libs/overlay/MapLabel.d.ts +63 -0
  27. package/dist/libs/overlay/MapMarker.d.ts +50 -0
  28. package/dist/libs/overlay/MapPolygon.d.ts +70 -0
  29. package/dist/libs/overlay/MapPolyline.d.ts +50 -0
  30. package/dist/libs/overlay/MapRectangle.d.ts +56 -0
  31. package/dist/libs/overlay/MapRing.d.ts +95 -0
  32. package/dist/libs/overlay/MapSVG.d.ts +63 -0
  33. package/dist/libs/overlay/index.d.ts +22 -0
  34. package/dist/libs/overlay/types.d.ts +41 -0
  35. package/dist/libs/toolBar/CesiumMapController.d.ts +78 -0
  36. package/dist/libs/toolBar/MapLayersService.d.ts +67 -0
  37. package/dist/libs/toolBar/MapSearchService.d.ts +41 -0
  38. package/dist/libs/toolBar/MapToolBarConfig.d.ts +3 -0
  39. package/dist/libs/toolBar/MeasurementService.d.ts +16 -0
  40. package/dist/libs/toolBar/NotFlyZonesService.d.ts +46 -0
  41. package/dist/package.json +5 -5
  42. package/dist/utils/calc.d.ts +44 -0
  43. package/dist/utils/common.d.ts +1 -0
  44. package/dist/z.const.d.ts +24 -0
  45. package/package.json +7 -7
@@ -0,0 +1,44 @@
1
+ import { Cartesian3, Ellipsoid, Rectangle } from '../../node_modules/cesium';
2
+ /**
3
+ * 判断一个 Cartesian3 是否为有效坐标(x/y/z 都是有限数字)
4
+ */
5
+ export declare function isValidCartesian3(pos: Cartesian3 | null | undefined): pos is Cartesian3;
6
+ /**
7
+ * 格式化距离显示
8
+ * 超过1000m时转换为km,保留两位小数
9
+ * @param distance 距离(米)
10
+ * @returns 格式化后的距离字符串
11
+ */
12
+ export declare function formatDistance(distance: number): string;
13
+ /**
14
+ * 格式化面积显示
15
+ * @param areaKm2 面积(平方公里)
16
+ * @returns 格式化后的面积字符串
17
+ */
18
+ export declare function formatArea(areaKm2: number): string;
19
+ /**
20
+ * 计算矩形
21
+ * @param p1 第一个点
22
+ * @param p2 第二个点
23
+ * @returns 矩形对象
24
+ */
25
+ export declare function calculateRectangle(p1: Cartesian3, p2: Cartesian3): Rectangle;
26
+ /**
27
+ * 计算矩形面积
28
+ * @param rect 矩形对象
29
+ * @returns 面积(平方公里)
30
+ */
31
+ export declare function calculateRectangleArea(rect: Rectangle): number;
32
+ /**
33
+ * 计算多边形面积
34
+ * @param positions 多边形顶点坐标数组
35
+ * @param ellipsoid 椭球体对象(默认使用 WGS84)
36
+ * @returns 面积(平方公里)
37
+ */
38
+ export declare function calculatePolygonArea(positions: Cartesian3[], ellipsoid?: Ellipsoid): number;
39
+ /**
40
+ * 计算多边形中心点
41
+ * @param positions 多边形顶点坐标数组
42
+ * @returns 中心点坐标
43
+ */
44
+ export declare function calculatePolygonCenter(positions: Cartesian3[]): Cartesian3;
@@ -1,4 +1,5 @@
1
1
  export declare function getViteTdToken(): any;
2
+ export declare function getViteCesiumToken(): any;
2
3
  /**
3
4
  * 将相机高度转换为地图层级
4
5
  * @param height 相机高度(米)
@@ -0,0 +1,24 @@
1
+ export declare const defaultHeatmapData: ({
2
+ lon: string;
3
+ lat: string;
4
+ height: string;
5
+ appearTime: number;
6
+ lng?: undefined;
7
+ } | {
8
+ lng: string;
9
+ lat: string;
10
+ height: string;
11
+ appearTime: number;
12
+ lon?: undefined;
13
+ })[][];
14
+ export declare const defaultHeatmapColors: {
15
+ 0: string;
16
+ 40: string;
17
+ 60: string;
18
+ 90: string;
19
+ 110: string;
20
+ };
21
+ export declare const defaultHeatmapOpacity: {
22
+ 0: number;
23
+ 0.5: number;
24
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xingm/vmap-cesium-toolbar",
3
- "version": "0.0.1",
3
+ "version": "0.0.2-alpha.10",
4
4
  "description": "A powerful Cesium map toolbar plugin with drawing, measurement, and interaction features",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "scripts": {
24
24
  "dev": "vite --force",
25
- "build": "vite build && vite build --mode lib",
26
- "build:lib": "vite build --mode lib",
25
+ "build": "vite build --mode lib",
26
+ "build:dts": "vue-tsc -p tsconfig.dts.json",
27
27
  "build:plugin": "node scripts/build-plugin.js",
28
28
  "generate:file-list": "node scripts/generate-file-list.js",
29
29
  "preview": "vite preview",
@@ -55,14 +55,14 @@
55
55
  "vue3",
56
56
  "typescript"
57
57
  ],
58
- "author": "Your Name",
58
+ "author": "pengxueyou",
59
59
  "license": "MIT",
60
60
  "repository": {
61
61
  "type": "git",
62
- "url": "https://github.com/your-username/vmap-cesium-toolbar.git"
62
+ "url": "git+https://github.com/benxueyou/vmap-cesium-toolbar.git"
63
63
  },
64
64
  "bugs": {
65
- "url": "https://github.com/your-username/vmap-cesium-toolbar/issues"
65
+ "url": "https://github.com/benxueyou/vmap-cesium-toolbar/issues"
66
66
  },
67
- "homepage": "https://github.com/your-username/vmap-cesium-toolbar#readme"
67
+ "homepage": "https://github.com/benxueyou/vmap-cesium-toolbar#readme"
68
68
  }