@xingm/vmap-cesium-toolbar 0.0.6 → 1.0.0

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 (133) hide show
  1. package/README.md +126 -230
  2. package/dist/README.md +172 -0
  3. package/dist/adapters/DrawHelperAdapter.d.ts +143 -0
  4. package/dist/adapters/MapLoaderAdapter.d.ts +44 -0
  5. package/dist/adapters/OverlayServiceAdapter.d.ts +102 -0
  6. package/dist/adapters/ToolbarAdapter.d.ts +71 -0
  7. package/dist/adapters/index.d.ts +23 -0
  8. package/dist/components/BaseComponent.d.ts +116 -0
  9. package/dist/components/SearchBox.d.ts +136 -0
  10. package/dist/components/Toolbar.d.ts +115 -0
  11. package/dist/components/ToolbarButton.d.ts +100 -0
  12. package/dist/components/index.d.ts +33 -0
  13. package/dist/core/MapPlugin.d.ts +160 -0
  14. package/dist/core/constants.d.ts +88 -0
  15. package/dist/core/entities/BaseOverlay.d.ts +156 -0
  16. package/dist/core/entities/Circle.d.ts +102 -0
  17. package/dist/core/entities/Icon.d.ts +86 -0
  18. package/dist/core/entities/InfoWindow.d.ts +116 -0
  19. package/dist/core/entities/Label.d.ts +92 -0
  20. package/dist/core/entities/Marker.d.ts +66 -0
  21. package/dist/core/entities/Polygon.d.ts +93 -0
  22. package/dist/core/entities/Polyline.d.ts +72 -0
  23. package/dist/core/entities/Rectangle.d.ts +99 -0
  24. package/dist/core/entities/Ring.d.ts +114 -0
  25. package/dist/core/entities/SVG.d.ts +89 -0
  26. package/dist/core/entities/index.d.ts +27 -0
  27. package/dist/core/index.d.ts +25 -0
  28. package/dist/core/layers/BaiduMapLayer.d.ts +37 -0
  29. package/dist/core/layers/CustomMapLayer.d.ts +43 -0
  30. package/dist/core/layers/GaodeMapLayer.d.ts +41 -0
  31. package/dist/core/layers/HeatmapLayer.d.ts +118 -0
  32. package/dist/core/layers/MapLayer.d.ts +37 -0
  33. package/dist/core/layers/OSMMapLayer.d.ts +37 -0
  34. package/dist/core/layers/PointClusterLayer.d.ts +119 -0
  35. package/dist/core/layers/TDTMapLayer.d.ts +45 -0
  36. package/dist/core/layers/index.d.ts +15 -0
  37. package/dist/core/services/draw/DrawInteractionController.d.ts +16 -0
  38. package/dist/core/services/draw/DrawService.d.ts +38 -0
  39. package/dist/core/services/draw/DrawSessionStore.d.ts +28 -0
  40. package/dist/core/services/draw/drawDefaults.d.ts +16 -0
  41. package/dist/core/services/draw/entities/drawEntityFactory.d.ts +10 -0
  42. package/dist/core/services/draw/entities/drawEntityRegistry.d.ts +8 -0
  43. package/dist/core/services/draw/entities/drawFinalFactory.d.ts +14 -0
  44. package/dist/core/services/draw/entities/drawPreviewFactory.d.ts +15 -0
  45. package/dist/core/services/draw/geometry/drawGeometry.d.ts +11 -0
  46. package/dist/core/services/draw/geometry/drawPosition.d.ts +6 -0
  47. package/dist/core/services/draw/index.d.ts +7 -0
  48. package/dist/core/services/draw/labels/drawHint.d.ts +16 -0
  49. package/dist/core/services/draw/labels/measurementCanvas.d.ts +8 -0
  50. package/dist/core/services/draw/labels/measurementLabelFactory.d.ts +18 -0
  51. package/dist/core/services/draw/measurementThemeResolver.d.ts +9 -0
  52. package/dist/core/services/draw/types/drawState.d.ts +37 -0
  53. package/dist/core/services/draw/types/drawTypes.d.ts +97 -0
  54. package/dist/core/services/index.d.ts +10 -0
  55. package/dist/core/services/overlay/OverlayService.d.ts +188 -0
  56. package/dist/core/services/overlay/index.d.ts +7 -0
  57. package/dist/core/services/toolbar/ToolbarService.d.ts +175 -0
  58. package/dist/core/services/toolbar/buttons/BaseButtonHandler.d.ts +111 -0
  59. package/dist/core/services/toolbar/buttons/LayersButtonHandler.d.ts +47 -0
  60. package/dist/core/services/toolbar/buttons/MeasureButtonHandler.d.ts +94 -0
  61. package/dist/core/services/toolbar/buttons/SearchButtonHandler.d.ts +111 -0
  62. package/dist/core/services/toolbar/buttons/SimpleButtonHandler.d.ts +79 -0
  63. package/dist/core/services/toolbar/config.d.ts +7 -0
  64. package/dist/core/services/toolbar/index.d.ts +30 -0
  65. package/dist/core/services/toolbar/menus/BaseMenu.d.ts +99 -0
  66. package/dist/core/services/toolbar/menus/MeasureMenu.d.ts +44 -0
  67. package/dist/core/services/toolbar/types.d.ts +198 -0
  68. package/dist/core/types.d.ts +586 -0
  69. package/dist/i18n/en-US.d.ts +46 -0
  70. package/dist/i18n/index.d.ts +45 -2
  71. package/dist/i18n/zh-CN.d.ts +46 -0
  72. package/dist/index.d.ts +37 -42
  73. package/dist/index.es.js +6874 -9666
  74. package/dist/index.es.js.map +1 -1
  75. package/dist/libs/CesiumMapModel.d.ts +1 -172
  76. package/dist/libs/CesiumMapToolbar.d.ts +1 -1
  77. package/dist/libs/CesiumOverlayService.d.ts +9 -222
  78. package/dist/libs/config/CesiumMapConfig.d.ts +5 -12
  79. package/dist/libs/drawHelper/DrawHint.d.ts +15 -27
  80. package/dist/libs/drawHelper/index.d.ts +67 -6
  81. package/dist/libs/toolBar/CesiumMapController.d.ts +38 -64
  82. package/dist/libs/toolBar/MapLayersService.d.ts +10 -61
  83. package/dist/libs/toolBar/MapSearchService.d.ts +8 -29
  84. package/dist/libs/toolBar/MapToolBarConfig.d.ts +33 -5
  85. package/dist/libs/toolBar/MeasurementService.d.ts +13 -5
  86. package/dist/libs/toolBar/NotFlyZonesService.d.ts +6 -41
  87. package/dist/package.json +19 -6
  88. package/dist/styles/ComponentStyles.d.ts +82 -0
  89. package/dist/styles/StyleManager.d.ts +142 -0
  90. package/dist/styles/index.d.ts +128 -0
  91. package/dist/utils/common.d.ts +4 -0
  92. package/package.json +1 -1
  93. package/dist/hooks/toolBarConfig.d.ts +0 -75
  94. package/dist/hooks/useDrawHelper.d.ts +0 -24
  95. package/dist/hooks/useDynamicRing.d.ts +0 -44
  96. package/dist/hooks/useHeatmapHelper.d.ts +0 -18
  97. package/dist/hooks/useMap.d.ts +0 -14
  98. package/dist/hooks/useMapInit.d.ts +0 -14
  99. package/dist/hooks/useOverlayHelper.d.ts +0 -48
  100. package/dist/hooks/usePointClusterHelper.d.ts +0 -14
  101. package/dist/index.umd.js +0 -326
  102. package/dist/index.umd.js.map +0 -1
  103. package/dist/libs/drawHelper/BaseDraw.d.ts +0 -194
  104. package/dist/libs/drawHelper/DrawCircle.d.ts +0 -31
  105. package/dist/libs/drawHelper/DrawLine.d.ts +0 -49
  106. package/dist/libs/drawHelper/DrawPolgon.d.ts +0 -35
  107. package/dist/libs/drawHelper/DrawRectangle.d.ts +0 -24
  108. package/dist/libs/i18n/en-US.d.ts +0 -69
  109. package/dist/libs/i18n/index.d.ts +0 -25
  110. package/dist/libs/i18n/zh-CN.d.ts +0 -69
  111. package/dist/libs/overlay/MapCircle.d.ts +0 -130
  112. package/dist/libs/overlay/MapIcon.d.ts +0 -69
  113. package/dist/libs/overlay/MapInfoWindow.d.ts +0 -100
  114. package/dist/libs/overlay/MapLabel.d.ts +0 -73
  115. package/dist/libs/overlay/MapMarker.d.ts +0 -60
  116. package/dist/libs/overlay/MapPolygon.d.ts +0 -114
  117. package/dist/libs/overlay/MapPolyline.d.ts +0 -64
  118. package/dist/libs/overlay/MapRectangle.d.ts +0 -101
  119. package/dist/libs/overlay/MapRing.d.ts +0 -107
  120. package/dist/libs/overlay/MapSVG.d.ts +0 -73
  121. package/dist/libs/overlay/OverlayEditController.d.ts +0 -167
  122. package/dist/libs/overlay/OverlayEditHandles.d.ts +0 -101
  123. package/dist/libs/overlay/OverlayHighlight.d.ts +0 -40
  124. package/dist/libs/overlay/index.d.ts +0 -23
  125. package/dist/libs/overlay/primitives/CirclePrimitiveBatch.d.ts +0 -42
  126. package/dist/libs/overlay/primitives/CirclePrimitiveLayerStack.d.ts +0 -24
  127. package/dist/libs/overlay/primitives/PolygonPrimitiveBatch.d.ts +0 -43
  128. package/dist/libs/overlay/primitives/PolygonPrimitiveLayerStack.d.ts +0 -24
  129. package/dist/libs/overlay/primitives/RectanglePrimitiveBatch.d.ts +0 -41
  130. package/dist/libs/overlay/primitives/RectanglePrimitiveLayerStack.d.ts +0 -24
  131. package/dist/libs/overlay/types.d.ts +0 -121
  132. package/dist/z.const.d.ts +0 -24
  133. /package/dist/{libs → utils}/PickGovernor.d.ts +0 -0
@@ -1,167 +0,0 @@
1
- import { Viewer } from '../../../node_modules/cesium';
2
- import { DrawEntity } from '../drawHelper';
3
- import { OverlayEntity } from './types';
4
- import { OverlayEditOptions } from './OverlayEditHandles';
5
- import * as Cesium from "cesium";
6
- export type OverlayEditChangeCallback = (entity: DrawEntity & OverlayEntity) => void;
7
- export interface OverlayEditControllerOptions {
8
- /**
9
- * 编辑模式下,拖拽结束(LEFT_UP)且覆盖物几何发生变化时触发。
10
- * 回调参数为“已回写后的覆盖物 entity”。
11
- */
12
- onChange?: OverlayEditChangeCallback;
13
- /** 编辑功能配置项,默认为全开(除 rotate) */
14
- overlayEditOptions?: OverlayEditOptions;
15
- }
16
- export interface OverlayEditHost {
17
- getViewer(): Viewer;
18
- getEntities(): Cesium.EntityCollection;
19
- getOverlayById(id: string): (DrawEntity & OverlayEntity) | undefined;
20
- pickCartographic(windowPosition: Cesium.Cartesian2): Cesium.Cartographic | null;
21
- /**
22
- * 进入编辑前的宿主清理动作(例如清 hover/click 高亮、清 hover 状态等)。
23
- * 由宿主决定“高亮系统/hover 系统”如何处理。
24
- */
25
- prepareEntityForEdit(entity: DrawEntity & OverlayEntity): void;
26
- /** 将编辑结果回写到覆盖物 */
27
- applyPolygonPositions(entity: DrawEntity & OverlayEntity, positions: Cesium.Cartesian3[]): void;
28
- applyRectangleCoordinates(entity: DrawEntity & OverlayEntity, rect: Cesium.Rectangle): void;
29
- applyCircle(entity: DrawEntity & OverlayEntity, center: Cesium.Cartesian3, radiusMeters: number): void;
30
- applyPolylinePositions(entity: DrawEntity & OverlayEntity, positions: Cesium.Cartesian3[]): void;
31
- applyPointPosition(entity: DrawEntity & OverlayEntity, position: Cesium.Cartesian3): void;
32
- }
33
- /**
34
- * 覆盖物编辑控制器类,用于管理地图上覆盖物的编辑操作
35
- * 支持多边形、矩形、圆形、折线和点等类型的编辑
36
- */
37
- export declare class OverlayEditController {
38
- private readonly host;
39
- private enabled;
40
- private handler;
41
- private readonly pickGovernor;
42
- private onChange;
43
- private editingTarget;
44
- private editingKind;
45
- private editingOptions;
46
- private editingPositions;
47
- private editingCircleCenter;
48
- private editingCircleRadiusMeters;
49
- private editingPointPosition;
50
- private handleEntities;
51
- private dragging;
52
- private dragSnapshot;
53
- private dragChanged;
54
- private moveStartCenter;
55
- private moveStartPositions;
56
- private transformStartCenter;
57
- private transformStartPositions;
58
- private rotateStartAngle;
59
- private scaleStartDistance;
60
- private cameraBackup;
61
- /**
62
- * 构造函数
63
- * @param host 覆盖物编辑宿主对象
64
- * @param options 配置选项
65
- */
66
- constructor(host: OverlayEditHost, options?: OverlayEditControllerOptions);
67
- /**
68
- * 设置编辑变化回调函数
69
- * @param cb 回调函数
70
- */
71
- setOnChange(cb?: OverlayEditChangeCallback | null): void;
72
- /**
73
- * 设置编辑器启用状态
74
- * @param enabled 是否启用
75
- * @param options 编辑功能配置项,可选。不传时使用构造函数传入的配置或默认配置
76
- */
77
- setEnabled(enabled: boolean, options?: OverlayEditOptions): void;
78
- /**
79
- * 获取编辑器启用状态
80
- * @returns 是否启用
81
- */
82
- getEnabled(): boolean;
83
- /**
84
- * 判断是否正在编辑
85
- * @returns 是否正在编辑
86
- */
87
- isEditing(): boolean;
88
- /**
89
- * 销毁编辑器
90
- */
91
- destroy(): void;
92
- /** 停止当前正在编辑的覆盖物(不会关闭全局编辑模式) */
93
- stop(): void;
94
- /**
95
- * 主动开始编辑某个覆盖物。
96
- * @returns true 表示成功进入编辑
97
- */
98
- start(entityOrId: (DrawEntity & OverlayEntity) | string, options?: OverlayEditOptions): boolean;
99
- /**
100
- * 解析编辑目标实体,根据特定条件返回合适的实体对象
101
- * @param entity 输入的实体对象,需要同时满足DrawEntity和OverlayEntity类型
102
- * @returns 返回解析后的实体对象,可能是原始实体或符合条件的其他实体
103
- */
104
- private resolveEditTarget;
105
- private detectEditableKind;
106
- private getPropertyValue;
107
- private getNumberProperty;
108
- private resolvePolygonPositions;
109
- private resolvePolylinePositions;
110
- private getEditablePolygonPositions;
111
- private getEditablePolylinePositions;
112
- private getEditablePointPosition;
113
- private getEditableRectangle;
114
- private getEditableCircleInfo;
115
- /**
116
- * 确保屏幕空间事件处理器已初始化
117
- * 如果处理器不存在,则创建一个新的处理器并设置各种交互事件
118
- */
119
- private ensureHandler;
120
- private beginDrag;
121
- private beginMoveDrag;
122
- private computeMovedPositions;
123
- private emitChange;
124
- private prepareOnChangeTarget;
125
- private resolveOverlayTypeFromId;
126
- private attachMarkerLngLat;
127
- private attachPolylineLngLat;
128
- private attachCircleLngLat;
129
- private attachPolygonLngLat;
130
- private attachRectangleLngLat;
131
- private captureDragSnapshot;
132
- private isGeometryChangedSinceSnapshot;
133
- private destroyHandler;
134
- private lockCameraController;
135
- private restoreCameraController;
136
- private clearHandles;
137
- /**
138
- * 重建处理句柄的方法
139
- * 根据当前编辑的几何图形类型,调用相应的构建函数创建处理句柄
140
- */
141
- private rebuildHandles;
142
- private getHandleHelpers;
143
- private createHandle;
144
- private applyEditedPolygon;
145
- private applyEditedRectangle;
146
- private applyEditedCircle;
147
- private applyEditedPolyline;
148
- private applyEditedPoint;
149
- private getEditingClampToGround;
150
- private getCartesianHeight;
151
- private convertOutlineToLngLat;
152
- private convertPositionToLngLat;
153
- private convertCartoToLngLat;
154
- private pickCartesianOnGlobe;
155
- private computeSurfaceDistanceMeters;
156
- private circleRadiusHandlePosition;
157
- private rectangleToPositions;
158
- private rectangleToLngLatPositions;
159
- private positionsToRectangle;
160
- private getRectangleEditHeight;
161
- private computePolygonCenterCartesian;
162
- private computePolygonCenterCartographic;
163
- private computePolylineHandleRadius;
164
- private offsetByMeters;
165
- private getLocalAngleAndDistance;
166
- private applyRotateScaleToPositions;
167
- }
@@ -1,101 +0,0 @@
1
- import * as Cesium from "cesium";
2
- /**
3
- * 句柄样式(颜色/描边/像素大小)
4
- */
5
- export type HandleStyle = {
6
- color: Cesium.Color;
7
- outlineColor: Cesium.Color;
8
- pixelSize: number;
9
- };
10
- /**
11
- * 创建编辑句柄实体
12
- */
13
- export type CreateHandle = (position: Cesium.Cartesian3, style: HandleStyle, meta: any) => Cesium.Entity;
14
- export interface OverlayEditOptions {
15
- vertex: {
16
- enable?: boolean;
17
- color?: Cesium.Color;
18
- outlineColor?: Cesium.Color;
19
- outlineWidth?: number;
20
- pixelSize?: number;
21
- } | boolean;
22
- mid: {
23
- enable?: boolean;
24
- color?: Cesium.Color;
25
- outlineColor?: Cesium.Color;
26
- outlineWidth?: number;
27
- pixelSize?: number;
28
- } | boolean;
29
- move: {
30
- enable?: boolean;
31
- color?: Cesium.Color;
32
- outlineColor?: Cesium.Color;
33
- outlineWidth?: number;
34
- pixelSize?: number;
35
- } | boolean;
36
- rotate: {
37
- enable?: boolean;
38
- color?: Cesium.Color;
39
- outlineColor?: Cesium.Color;
40
- outlineWidth?: number;
41
- pixelSize?: number;
42
- } | boolean;
43
- scale: {
44
- enable?: boolean;
45
- color?: Cesium.Color;
46
- outlineColor?: Cesium.Color;
47
- outlineWidth?: number;
48
- pixelSize?: number;
49
- } | boolean;
50
- }
51
- export declare const DEFAULT_OPTIONS: OverlayEditOptions;
52
- /**
53
- * 构建/更新句柄所需的依赖函数集合
54
- */
55
- export interface HandleHelpers {
56
- createHandle: CreateHandle;
57
- computePolygonCenterCartesian: (positions: Cesium.Cartesian3[]) => Cesium.Cartesian3;
58
- computePolylineHandleRadius: (positions: Cesium.Cartesian3[], center: Cesium.Cartesian3) => number;
59
- offsetByMeters: (center: Cesium.Cartesian3, meters: number, bearingDeg: number) => Cesium.Cartesian3;
60
- circleRadiusHandlePosition: (center: Cesium.Cartesian3, radiusMeters: number) => Cesium.Cartesian3;
61
- }
62
- /**
63
- * 构建多边形编辑句柄(顶点/中点/整体移动)
64
- */
65
- export declare function buildPolygonHandles(verts: Cesium.Cartesian3[], helpers: HandleHelpers, options: OverlayEditOptions): Cesium.Entity[];
66
- /**
67
- * 构建矩形编辑句柄(顶点/边中点/整体移动)
68
- */
69
- export declare function buildRectangleHandles(verts: Cesium.Cartesian3[], helpers: HandleHelpers, options: OverlayEditOptions): Cesium.Entity[];
70
- /**
71
- * 构建折线编辑句柄(顶点/中点/整体移动/旋转/缩放)
72
- */
73
- export declare function buildPolylineHandles(verts: Cesium.Cartesian3[], helpers: HandleHelpers, options: OverlayEditOptions): Cesium.Entity[];
74
- /**
75
- * 构建点编辑句柄
76
- */
77
- export declare function buildPointHandles(pos: Cesium.Cartesian3 | null, helpers: HandleHelpers, options: OverlayEditOptions): Cesium.Entity[];
78
- /**
79
- * 构建圆形编辑句柄(圆心/半径)
80
- */
81
- export declare function buildCircleHandles(center: Cesium.Cartesian3 | null, radiusMeters: number, helpers: HandleHelpers, options: OverlayEditOptions): Cesium.Entity[];
82
- /**
83
- * 更新多边形句柄位置
84
- * @returns false 表示句柄数量不匹配,需重建
85
- */
86
- export declare function updatePolygonHandlePositions(verts: Cesium.Cartesian3[], handles: Cesium.Entity[], helpers: HandleHelpers): boolean;
87
- /**
88
- * 更新折线句柄位置
89
- * @returns false 表示句柄数量不匹配,需重建
90
- */
91
- export declare function updatePolylineHandlePositions(verts: Cesium.Cartesian3[], handles: Cesium.Entity[], helpers: HandleHelpers): boolean;
92
- /**
93
- * 更新点句柄位置
94
- * @returns false 表示句柄数量不匹配或参数为空
95
- */
96
- export declare function updatePointHandlePositions(pos: Cesium.Cartesian3 | null, handles: Cesium.Entity[]): boolean;
97
- /**
98
- * 更新圆形句柄位置
99
- * @returns false 表示句柄数量不匹配或参数为空
100
- */
101
- export declare function updateCircleHandlePositions(center: Cesium.Cartesian3 | null, radiusMeters: number, handles: Cesium.Entity[], helpers: HandleHelpers): boolean;
@@ -1,40 +0,0 @@
1
- import { Entity } from '../../../node_modules/cesium';
2
- import { DrawEntity } from '../drawHelper';
3
- import { OverlayEntity } from './types';
4
- import { MapCircle } from './MapCircle';
5
- import { MapPolygon } from './MapPolygon';
6
- import { MapRectangle } from './MapRectangle';
7
- import * as Cesium from "cesium";
8
- export interface OverlayHighlightHost {
9
- getEntities(): Cesium.EntityCollection;
10
- getOverlayById(id: string): (DrawEntity & OverlayEntity) | undefined;
11
- getPropertyValue<T>(prop: any, fallback: T): T;
12
- getNumberProperty(prop: any, fallback: number): number;
13
- getCircle(): MapCircle;
14
- getPolygon(): MapPolygon;
15
- getRectangle(): MapRectangle;
16
- }
17
- export declare class OverlayHighlight {
18
- private readonly host;
19
- private static readonly DEFAULT_HIGHLIGHT_COLOR;
20
- private static readonly DEFAULT_HIGHLIGHT_FILL_ALPHA;
21
- private static readonly DEFAULT_HIGHLIGHT_GLOW_POWER;
22
- private static readonly GLOW_OUTLINE_ROOT_ID_PROP;
23
- private readonly entities;
24
- constructor(host: OverlayHighlightHost);
25
- mapGlowOutlineEntityToRoot(entity: Cesium.Entity): (DrawEntity & OverlayEntity) | null;
26
- setOverlayHighlightReason(targets: Entity[], reason: "click" | "hover", enabled: boolean): void;
27
- toggleOverlayHighlight(entity: OverlayEntity, reason?: "click" | "hover"): void;
28
- setOverlayHighlight(entityOrId: OverlayEntity | string, enabled: boolean, reason?: "click" | "hover"): boolean;
29
- private getEntityPropertyString;
30
- private getPropertyValue;
31
- private getNumberProperty;
32
- private resolveHighlightOptions;
33
- private getActiveHighlightOptions;
34
- private getClosedPositions;
35
- private generateEllipseOutlinePositions;
36
- private ensureGlowOutline;
37
- private removeGlowOutline;
38
- private applyOverlayHighlightStyle;
39
- private restoreOverlayHighlightStyle;
40
- }
@@ -1,23 +0,0 @@
1
- export { CesiumOverlayService } from '../CesiumOverlayService';
2
- export type { CesiumOverlayServiceOptions } from '../CesiumOverlayService';
3
- export { MapMarker } from './MapMarker';
4
- export { MapLabel } from './MapLabel';
5
- export { MapIcon } from './MapIcon';
6
- export { MapSVG } from './MapSVG';
7
- export { MapInfoWindow } from './MapInfoWindow';
8
- export { MapPolyline } from './MapPolyline';
9
- export { MapPolygon } from './MapPolygon';
10
- export { MapRectangle } from './MapRectangle';
11
- export { MapCircle } from './MapCircle';
12
- export { MapRing } from './MapRing';
13
- export type { OverlayPosition } from './types';
14
- export type { MarkerOptions } from './MapMarker';
15
- export type { LabelOptions } from './MapLabel';
16
- export type { IconOptions } from './MapIcon';
17
- export type { SvgOptions } from './MapSVG';
18
- export type { InfoWindowOptions } from './MapInfoWindow';
19
- export type { PolylineOptions } from './MapPolyline';
20
- export type { PolygonOptions } from './MapPolygon';
21
- export type { RectangleOptions } from './MapRectangle';
22
- export type { CircleOptions } from './MapCircle';
23
- export type { RingOptions } from './MapRing';
@@ -1,42 +0,0 @@
1
- import { Viewer, Entity } from '../../../../node_modules/cesium';
2
- import * as Cesium from 'cesium';
3
- export interface CirclePrimitiveParts {
4
- outer: Entity;
5
- inner: Entity;
6
- }
7
- export declare class CirclePrimitiveBatch {
8
- private viewer;
9
- private ringCollection;
10
- private fillCollection;
11
- private ownsCollections;
12
- private ownedRootCollection;
13
- private ringPrimitive;
14
- private fillPrimitive;
15
- private records;
16
- private rebuildScheduled;
17
- private colorApplyScheduled;
18
- private pendingColorApplyIds;
19
- constructor(viewer: Viewer, options?: {
20
- ringCollection?: Cesium.PrimitiveCollection;
21
- fillCollection?: Cesium.PrimitiveCollection;
22
- });
23
- destroy(): void;
24
- has(circleId: string): boolean;
25
- upsertGeometry(args: {
26
- circleId: string;
27
- parts: CirclePrimitiveParts;
28
- ringPositions: Cesium.Cartesian3[];
29
- fillPositions: Cesium.Cartesian3[];
30
- ringColor: Cesium.Color;
31
- fillColor: Cesium.Color;
32
- visible: boolean;
33
- }): void;
34
- remove(circleId: string): void;
35
- setVisible(circleId: string, visible: boolean): void;
36
- setColors(circleId: string, ringColor: Cesium.Color, fillColor: Cesium.Color): void;
37
- private scheduleApplyColors;
38
- private scheduleRebuild;
39
- private assertCloneableInstanceId;
40
- private rebuild;
41
- private applyCurrentColors;
42
- }
@@ -1,24 +0,0 @@
1
- import { Viewer } from '../../../../node_modules/cesium';
2
- import * as Cesium from 'cesium';
3
- export interface CirclePrimitiveLayerCollections {
4
- fillCollection: Cesium.PrimitiveCollection;
5
- ringCollection: Cesium.PrimitiveCollection;
6
- }
7
- /**
8
- * 为 Circle(圆)Primitive 渲染维护一个稳定的有序图层栈。
9
- *
10
- * 渲染顺序:
11
- * - 所有填充图层(从下到上)
12
- * - 所有外环图层(从下到上)
13
- *
14
- * 这样可以确保在存在多个半透明填充重叠时,外环边界仍然清晰可见。
15
- */
16
- export declare class CirclePrimitiveLayerStack {
17
- private viewer;
18
- private fillsRoot;
19
- private ringsRoot;
20
- private layers;
21
- constructor(viewer: Viewer);
22
- getLayerCollections(layerKey: string): CirclePrimitiveLayerCollections;
23
- destroy(): void;
24
- }
@@ -1,43 +0,0 @@
1
- import { Viewer, Entity } from '../../../../node_modules/cesium';
2
- import * as Cesium from 'cesium';
3
- export interface PolygonPrimitiveParts {
4
- fill: Entity;
5
- border: Entity;
6
- }
7
- export declare class PolygonPrimitiveBatch {
8
- private viewer;
9
- private fillCollection;
10
- private borderCollection;
11
- private ownsCollections;
12
- private ownedRootCollection;
13
- private fillPrimitive;
14
- private borderPrimitive;
15
- private records;
16
- private rebuildScheduled;
17
- private colorApplyScheduled;
18
- private pendingColorApplyIds;
19
- constructor(viewer: Viewer, options?: {
20
- fillCollection?: Cesium.PrimitiveCollection;
21
- borderCollection?: Cesium.PrimitiveCollection;
22
- });
23
- destroy(): void;
24
- upsertGeometry(args: {
25
- polygonId: string;
26
- parts: PolygonPrimitiveParts;
27
- fillPositions: Cesium.Cartesian3[];
28
- borderPositions: Cesium.Cartesian3[];
29
- borderWidth: number;
30
- fillColor: Cesium.Color;
31
- borderColor: Cesium.Color;
32
- visible: boolean;
33
- }): void;
34
- remove(polygonId: string): void;
35
- setVisible(polygonId: string, visible: boolean): void;
36
- setColors(polygonId: string, borderColor: Cesium.Color, fillColor: Cesium.Color): void;
37
- private scheduleApplyColors;
38
- setBorderWidth(polygonId: string, borderWidth: number): void;
39
- private scheduleRebuild;
40
- private assertCloneableInstanceId;
41
- private rebuild;
42
- private applyCurrentColors;
43
- }
@@ -1,24 +0,0 @@
1
- import { Viewer } from '../../../../node_modules/cesium';
2
- import * as Cesium from 'cesium';
3
- export interface PolygonPrimitiveLayerCollections {
4
- fillCollection: Cesium.PrimitiveCollection;
5
- borderCollection: Cesium.PrimitiveCollection;
6
- }
7
- /**
8
- * 为 Polygon(多边形)Primitive 渲染维护一个稳定的有序图层栈。
9
- *
10
- * 渲染顺序:
11
- * - 所有填充图层(从下到上)
12
- * - 所有边框图层(从下到上)
13
- *
14
- * 这样可以确保在存在多个半透明填充重叠时,边框仍然清晰可见。
15
- */
16
- export declare class PolygonPrimitiveLayerStack {
17
- private viewer;
18
- private fillsRoot;
19
- private bordersRoot;
20
- private layers;
21
- constructor(viewer: Viewer);
22
- getLayerCollections(layerKey: string): PolygonPrimitiveLayerCollections;
23
- destroy(): void;
24
- }
@@ -1,41 +0,0 @@
1
- import { Viewer, Entity } from '../../../../node_modules/cesium';
2
- import * as Cesium from 'cesium';
3
- export interface RectanglePrimitiveParts {
4
- outer: Entity;
5
- inner: Entity;
6
- }
7
- export declare class RectanglePrimitiveBatch {
8
- private viewer;
9
- private ringCollection;
10
- private fillCollection;
11
- private ownsCollections;
12
- private ownedRootCollection;
13
- private ringPrimitive;
14
- private fillPrimitive;
15
- private records;
16
- private rebuildScheduled;
17
- private colorApplyScheduled;
18
- private pendingColorApplyIds;
19
- constructor(viewer: Viewer, options?: {
20
- ringCollection?: Cesium.PrimitiveCollection;
21
- fillCollection?: Cesium.PrimitiveCollection;
22
- });
23
- destroy(): void;
24
- upsertGeometry(args: {
25
- rectangleId: string;
26
- parts: RectanglePrimitiveParts;
27
- outerPositions: Cesium.Cartesian3[];
28
- innerPositions: Cesium.Cartesian3[];
29
- ringColor: Cesium.Color;
30
- fillColor: Cesium.Color;
31
- visible: boolean;
32
- }): void;
33
- remove(rectangleId: string): void;
34
- setVisible(rectangleId: string, visible: boolean): void;
35
- setColors(rectangleId: string, ringColor: Cesium.Color, fillColor: Cesium.Color): void;
36
- private scheduleApplyColors;
37
- private scheduleRebuild;
38
- private assertCloneableInstanceId;
39
- private rebuild;
40
- private applyCurrentColors;
41
- }
@@ -1,24 +0,0 @@
1
- import { Viewer } from '../../../../node_modules/cesium';
2
- import * as Cesium from 'cesium';
3
- export interface RectanglePrimitiveLayerCollections {
4
- fillCollection: Cesium.PrimitiveCollection;
5
- ringCollection: Cesium.PrimitiveCollection;
6
- }
7
- /**
8
- * 为矩形 Primitive 渲染维护一个稳定的有序图层栈。
9
- *
10
- * 渲染顺序:
11
- * - 所有填充图层(从下到上)
12
- * - 所有描边图层(从下到上)
13
- *
14
- * 这样可以确保在存在多个半透明填充重叠时,描边仍然清晰可见。
15
- */
16
- export declare class RectanglePrimitiveLayerStack {
17
- private viewer;
18
- private fillsRoot;
19
- private ringsRoot;
20
- private layers;
21
- constructor(viewer: Viewer);
22
- getLayerCollections(layerKey: string): RectanglePrimitiveLayerCollections;
23
- destroy(): void;
24
- }
@@ -1,121 +0,0 @@
1
- import { Cartesian3, Entity, Color, MaterialProperty, Rectangle, Cartographic } from '../../../node_modules/cesium';
2
- /**
3
- * 覆盖物位置类型
4
- */
5
- export type OverlayPosition = Cartesian3 | [number, number] | [number, number, number];
6
- export interface OverlayHighlightOriginalStyle {
7
- point?: {
8
- pixelSize?: any;
9
- color?: any;
10
- outlineColor?: any;
11
- outlineWidth?: any;
12
- };
13
- label?: {
14
- fillColor?: any;
15
- outlineColor?: any;
16
- outlineWidth?: any;
17
- scale?: any;
18
- };
19
- billboard?: {
20
- scale?: any;
21
- color?: any;
22
- };
23
- polyline?: {
24
- width?: any;
25
- material?: any;
26
- };
27
- polygon?: {
28
- outline?: any;
29
- outlineColor?: any;
30
- outlineWidth?: any;
31
- material?: any;
32
- };
33
- rectangle?: {
34
- outline?: any;
35
- outlineColor?: any;
36
- outlineWidth?: any;
37
- material?: any;
38
- };
39
- ellipse?: {
40
- outline?: any;
41
- outlineColor?: any;
42
- outlineWidth?: any;
43
- material?: any;
44
- };
45
- }
46
- export interface OverlayClickHighlightOptions {
47
- /** 高亮主颜色(默认 yellow) */
48
- color?: Color | string;
49
- /** 面填充透明度(默认 0.35) */
50
- fillAlpha?: number;
51
- }
52
- /** 与 clickHighlight 使用同样的参数结构(颜色 + 面填充透明度) */
53
- export type OverlayHoverHighlightOptions = OverlayClickHighlightOptions;
54
- /**
55
- * 覆盖物扩展实体类型
56
- * 用于在 Cesium.Entity 上挂载覆盖物相关的元数据
57
- */
58
- export interface OverlayEntity extends Entity {
59
- /** 覆盖物点击回调(由各 Map* 工具类设置) */
60
- _onClick?: (entity: Entity) => void;
61
- /** 点击覆盖物时是否启用高亮(由各 Map* 工具类设置) */
62
- _clickHighlight?: boolean | OverlayClickHighlightOptions;
63
- /** 鼠标移入覆盖物时是否启用高亮(由各 Map* 工具类设置) */
64
- _hoverHighlight?: boolean | OverlayHoverHighlightOptions;
65
- /** 高亮联动的实体集合(复合覆盖物:边框/填充等一起切换) */
66
- _highlightEntities?: Entity[];
67
- /** 当前是否处于高亮状态 */
68
- _isHighlighted?: boolean;
69
- /** 当前高亮原因(click/hover 可叠加;click 优先显示) */
70
- _highlightState?: {
71
- click?: boolean;
72
- hover?: boolean;
73
- };
74
- /** 用于还原高亮前的原始样式 */
75
- _highlightOriginalStyle?: OverlayHighlightOriginalStyle;
76
- /** 高亮时临时创建的“发光边框”实体(由 CesiumOverlayService 管理) */
77
- _highlightGlowEntity?: Entity;
78
- /** 覆盖物类型标识(用于 CesiumOverlayService 做差异化更新/删除) */
79
- _overlayType?: string;
80
- /** 信息窗口根 DOM(由 MapInfoWindow / CesiumOverlayService 使用) */
81
- _infoWindow?: HTMLElement;
82
- /** 复合图形的内层实体或边框实体等关联引用 */
83
- _borderEntity?: Entity;
84
- _innerEntity?: Entity;
85
- /** 粗边框 / 环形等形状相关元数据 */
86
- /** 是否贴地(粗边框/环形等复合形状用) */
87
- _clampToGround?: boolean;
88
- /** 复合形状的基准高度(米,clampToGround=false 时有效) */
89
- _baseHeight?: number;
90
- /** 贴地抬高量(米,clampToGround=true 时有效) */
91
- _groundHeightEpsilon?: number;
92
- _isThickOutline?: boolean;
93
- _outlineWidth?: number;
94
- _isRing?: boolean;
95
- _ringThickness?: number;
96
- _ringSegments?: number;
97
- _ringGlowPower?: number;
98
- _ringLineColor?: Color | string;
99
- _ringLineStyle?: 'solid' | 'dashed';
100
- _ringLineMaterialMode?: 'stripe' | 'dash';
101
- _ringStripeRepeat?: number;
102
- _ringDashLength?: number;
103
- _ringDashPattern?: number;
104
- _ringGapColor?: Color | string;
105
- _ringShowInnerLine?: boolean;
106
- _fillMaterial?: MaterialProperty | Color | string;
107
- _ringHeightEpsilon?: number;
108
- _centerCartographic?: Cartographic;
109
- _outerRadius?: number;
110
- _innerRadius?: number;
111
- _outerRectangle?: Rectangle;
112
- /** primitive circle: 内部使用的纯色缓存(用于高亮恢复) */
113
- /** primitive layer key: 用于分层批处理路由 */
114
- _primitiveLayerKey?: string;
115
- _primitiveRingBaseColor?: Color;
116
- _primitiveFillBaseColor?: Color;
117
- /** primitive:用于高亮发光边框的外圈/边界位置(通常为闭合折线) */
118
- _primitiveOutlinePositions?: Cartesian3[];
119
- /** primitive polygon/rectangle: 边框纯色缓存(用于高亮恢复) */
120
- _primitiveBorderBaseColor?: Color;
121
- }
package/dist/z.const.d.ts DELETED
@@ -1,24 +0,0 @@
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
- };
File without changes