@xingm/vmap-cesium-toolbar 0.0.2 → 0.0.3-alpha.2
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/hooks/useOverlayHelper.d.ts +25 -1
- package/dist/hooks/usePointClusterHelper.d.ts +24 -0
- package/dist/i18n/en-US.d.ts +8 -0
- package/dist/i18n/zh-CN.d.ts +8 -0
- package/dist/index.d.ts +42 -1014
- package/dist/{index.js → index.es.js} +2430 -1103
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +8 -8
- package/dist/index.umd.js.map +1 -1
- package/dist/libs/CesiumHeatmapLayer.d.ts +9 -0
- package/dist/libs/CesiumMapDraw.d.ts +18 -27
- package/dist/libs/CesiumOverlayService.d.ts +68 -1
- package/dist/libs/CesiumPointClusterLayer.d.ts +73 -0
- package/dist/libs/drawHelper/BaseDraw.d.ts +2 -0
- package/dist/libs/drawHelper/DrawHint.d.ts +32 -0
- package/dist/libs/drawHelper/DrawLine.d.ts +4 -0
- package/dist/libs/drawHelper/index.d.ts +1 -0
- package/dist/libs/overlay/MapCircle.d.ts +10 -0
- package/dist/libs/overlay/MapInfoWindow.d.ts +3 -3
- package/dist/libs/overlay/OverlayEditController.d.ts +127 -0
- package/dist/libs/overlay/index.d.ts +1 -0
- package/dist/libs/overlay/types.d.ts +4 -0
- package/dist/utils/selfIntersection.d.ts +2 -0
- package/package.json +9 -8
- package/dist/index.js.map +0 -1
- package/dist/package.json +0 -45
- package/dist/style.css +0 -162
|
@@ -3,6 +3,14 @@ import { Entity } from '../../node_modules/cesium';
|
|
|
3
3
|
import { OverlayEntity } from '../libs/overlay/types';
|
|
4
4
|
import { CesiumOverlayService } from '../libs/overlay';
|
|
5
5
|
import * as Cesium from "cesium";
|
|
6
|
+
type OverlayEditChangeHandler = (entity: Entity & OverlayEntity) => void;
|
|
7
|
+
type OverlayHelperOptions = {
|
|
8
|
+
/**
|
|
9
|
+
* 覆盖物编辑模式下,拖拽结束且几何变化时触发。
|
|
10
|
+
* 可用于同步业务数据或触发保存。
|
|
11
|
+
*/
|
|
12
|
+
onOverlayEditChange?: OverlayEditChangeHandler;
|
|
13
|
+
};
|
|
6
14
|
/**
|
|
7
15
|
* 覆盖物相关的辅助逻辑
|
|
8
16
|
* - 提供添加点位(Marker)与示例覆盖物的便捷方法
|
|
@@ -10,6 +18,9 @@ import * as Cesium from "cesium";
|
|
|
10
18
|
*/
|
|
11
19
|
export declare function useOverlayHelper(viewer: Ref<Cesium.Viewer | undefined>, message: Ref<string>): {
|
|
12
20
|
overlayService: Ref<{
|
|
21
|
+
beginBulkUpdate: () => void;
|
|
22
|
+
endBulkUpdate: () => void;
|
|
23
|
+
bulkUpdate: <T>(fn: () => T) => T;
|
|
13
24
|
readonly marker: {
|
|
14
25
|
add: (options: import('../libs/overlay').MarkerOptions) => Entity;
|
|
15
26
|
updatePosition: (entity: Entity, position: import('../libs/overlay').OverlayPosition) => void;
|
|
@@ -92,6 +103,10 @@ export declare function useOverlayHelper(viewer: Ref<Cesium.Viewer | undefined>,
|
|
|
92
103
|
setVisible: (entity: Entity, visible: boolean) => void;
|
|
93
104
|
remove: (entityOrId: Entity | string) => boolean;
|
|
94
105
|
};
|
|
106
|
+
setOverlayEditMode: (enabled: boolean) => void;
|
|
107
|
+
getOverlayEditModeEnabled: () => boolean;
|
|
108
|
+
stopOverlayEdit: () => void;
|
|
109
|
+
startOverlayEdit: (entityOrId: (import('..').DrawEntity & OverlayEntity) | string) => boolean;
|
|
95
110
|
toggleOverlayHighlight: (entity: OverlayEntity, reason?: "click" | "hover") => void;
|
|
96
111
|
setOverlayHighlight: (entityOrId: OverlayEntity | string, enabled: boolean, reason?: "click" | "hover") => boolean;
|
|
97
112
|
addMarker: (options: import('../libs/overlay').MarkerOptions) => Entity;
|
|
@@ -113,6 +128,9 @@ export declare function useOverlayHelper(viewer: Ref<Cesium.Viewer | undefined>,
|
|
|
113
128
|
getAllOverlays: () => Entity[];
|
|
114
129
|
destroy: () => void;
|
|
115
130
|
} | null, CesiumOverlayService | {
|
|
131
|
+
beginBulkUpdate: () => void;
|
|
132
|
+
endBulkUpdate: () => void;
|
|
133
|
+
bulkUpdate: <T>(fn: () => T) => T;
|
|
116
134
|
readonly marker: {
|
|
117
135
|
add: (options: import('../libs/overlay').MarkerOptions) => Entity;
|
|
118
136
|
updatePosition: (entity: Entity, position: import('../libs/overlay').OverlayPosition) => void;
|
|
@@ -195,6 +213,10 @@ export declare function useOverlayHelper(viewer: Ref<Cesium.Viewer | undefined>,
|
|
|
195
213
|
setVisible: (entity: Entity, visible: boolean) => void;
|
|
196
214
|
remove: (entityOrId: Entity | string) => boolean;
|
|
197
215
|
};
|
|
216
|
+
setOverlayEditMode: (enabled: boolean) => void;
|
|
217
|
+
getOverlayEditModeEnabled: () => boolean;
|
|
218
|
+
stopOverlayEdit: () => void;
|
|
219
|
+
startOverlayEdit: (entityOrId: (import('..').DrawEntity & OverlayEntity) | string) => boolean;
|
|
198
220
|
toggleOverlayHighlight: (entity: OverlayEntity, reason?: "click" | "hover") => void;
|
|
199
221
|
setOverlayHighlight: (entityOrId: OverlayEntity | string, enabled: boolean, reason?: "click" | "hover") => boolean;
|
|
200
222
|
addMarker: (options: import('../libs/overlay').MarkerOptions) => Entity;
|
|
@@ -216,7 +238,7 @@ export declare function useOverlayHelper(viewer: Ref<Cesium.Viewer | undefined>,
|
|
|
216
238
|
getAllOverlays: () => Entity[];
|
|
217
239
|
destroy: () => void;
|
|
218
240
|
} | null>;
|
|
219
|
-
initOverlayService: () => void;
|
|
241
|
+
initOverlayService: (options?: OverlayHelperOptions) => void;
|
|
220
242
|
addMarker: () => void;
|
|
221
243
|
addMarkerWithLabel: () => void;
|
|
222
244
|
addLabel: (options: any) => void;
|
|
@@ -237,8 +259,10 @@ export declare function useOverlayHelper(viewer: Ref<Cesium.Viewer | undefined>,
|
|
|
237
259
|
addPolygon: () => void;
|
|
238
260
|
addRectangle: () => void;
|
|
239
261
|
addInfoWindow: () => void;
|
|
262
|
+
closeInfoWindow: () => void;
|
|
240
263
|
testSetOverlayHighlight: () => void;
|
|
241
264
|
testToggleOverlayHighlight: () => void;
|
|
242
265
|
cancelMarkerMode: () => void;
|
|
243
266
|
destroyOverlayService: () => void;
|
|
244
267
|
};
|
|
268
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { default as CesiumPointClusterLayer, ClusterPoint, PointClusterLayerOptions } from '../libs/CesiumPointClusterLayer';
|
|
3
|
+
import * as Cesium from 'cesium';
|
|
4
|
+
/**
|
|
5
|
+
* 点聚类图层相关的辅助逻辑(Vue3 composition API)
|
|
6
|
+
*/
|
|
7
|
+
export declare function usePointClusterHelper(viewer: Ref<Cesium.Viewer | undefined>): {
|
|
8
|
+
clusterLayer: Ref<{
|
|
9
|
+
setData: (points: ClusterPoint[]) => void;
|
|
10
|
+
setVisible: (visible: boolean) => void;
|
|
11
|
+
setClusteringEnabled: (enabled: boolean) => void;
|
|
12
|
+
destroy: () => void;
|
|
13
|
+
} | null, CesiumPointClusterLayer | {
|
|
14
|
+
setData: (points: ClusterPoint[]) => void;
|
|
15
|
+
setVisible: (visible: boolean) => void;
|
|
16
|
+
setClusteringEnabled: (enabled: boolean) => void;
|
|
17
|
+
destroy: () => void;
|
|
18
|
+
} | null>;
|
|
19
|
+
visible: Ref<boolean, boolean>;
|
|
20
|
+
initCluster: (options?: PointClusterLayerOptions) => void;
|
|
21
|
+
updateClusterData: (points: ClusterPoint[]) => void;
|
|
22
|
+
setClusterVisible: (v: boolean) => void;
|
|
23
|
+
destroyCluster: () => void;
|
|
24
|
+
};
|
package/dist/i18n/en-US.d.ts
CHANGED
|
@@ -64,6 +64,11 @@ declare const enUS: {
|
|
|
64
64
|
lod_medium: string;
|
|
65
65
|
lod_fine: string;
|
|
66
66
|
};
|
|
67
|
+
overlay_edit: {
|
|
68
|
+
enable: string;
|
|
69
|
+
disable: string;
|
|
70
|
+
stop: string;
|
|
71
|
+
};
|
|
67
72
|
};
|
|
68
73
|
draw: {
|
|
69
74
|
start: {
|
|
@@ -130,6 +135,9 @@ declare const enUS: {
|
|
|
130
135
|
info_window_desc: string;
|
|
131
136
|
ring_added: string;
|
|
132
137
|
ring_clicked: string;
|
|
138
|
+
edit_mode_on: string;
|
|
139
|
+
edit_mode_off: string;
|
|
140
|
+
edit_stopped: string;
|
|
133
141
|
};
|
|
134
142
|
};
|
|
135
143
|
export default enUS;
|
package/dist/i18n/zh-CN.d.ts
CHANGED
|
@@ -64,6 +64,11 @@ declare const zhCN: {
|
|
|
64
64
|
lod_medium: string;
|
|
65
65
|
lod_fine: string;
|
|
66
66
|
};
|
|
67
|
+
overlay_edit: {
|
|
68
|
+
enable: string;
|
|
69
|
+
disable: string;
|
|
70
|
+
stop: string;
|
|
71
|
+
};
|
|
67
72
|
};
|
|
68
73
|
draw: {
|
|
69
74
|
start: {
|
|
@@ -130,6 +135,9 @@ declare const zhCN: {
|
|
|
130
135
|
info_window_desc: string;
|
|
131
136
|
ring_added: string;
|
|
132
137
|
ring_clicked: string;
|
|
138
|
+
edit_mode_on: string;
|
|
139
|
+
edit_mode_off: string;
|
|
140
|
+
edit_stopped: string;
|
|
133
141
|
};
|
|
134
142
|
};
|
|
135
143
|
export default zhCN;
|