@xingm/vmap-cesium-toolbar 0.0.4 → 0.0.6
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/README.md +1 -1
- package/dist/hooks/useDrawHelper.d.ts +1 -49
- package/dist/hooks/useHeatmapHelper.d.ts +1 -17
- package/dist/hooks/useOverlayHelper.d.ts +1 -223
- package/dist/hooks/usePointClusterHelper.d.ts +1 -11
- package/dist/index.es.js +1527 -1201
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/dist/libs/CesiumMapDraw.d.ts +1 -0
- package/dist/libs/CesiumMapModel.d.ts +3 -3
- package/dist/libs/CesiumOverlayService.d.ts +16 -11
- package/dist/libs/CesiumPointClusterLayer.d.ts +2 -0
- package/dist/libs/PickGovernor.d.ts +23 -0
- package/dist/libs/drawHelper/DrawLine.d.ts +1 -0
- package/dist/libs/i18n/en-US.d.ts +3 -0
- package/dist/libs/i18n/zh-CN.d.ts +3 -0
- package/dist/libs/overlay/MapCircle.d.ts +2 -0
- package/dist/libs/overlay/MapPolygon.d.ts +2 -0
- package/dist/libs/overlay/MapPolyline.d.ts +4 -0
- package/dist/libs/overlay/MapRectangle.d.ts +2 -0
- package/dist/libs/overlay/MapRing.d.ts +3 -1
- package/dist/libs/overlay/OverlayEditController.d.ts +45 -2
- package/dist/libs/overlay/OverlayEditHandles.d.ts +43 -5
- package/dist/libs/overlay/primitives/CirclePrimitiveBatch.d.ts +1 -0
- package/dist/libs/overlay/primitives/PolygonPrimitiveBatch.d.ts +1 -0
- package/dist/libs/overlay/primitives/RectanglePrimitiveBatch.d.ts +1 -0
- package/dist/libs/overlay/types.d.ts +2 -0
- package/dist/libs/toolBar/MapLayersService.d.ts +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -80,11 +80,11 @@ export interface MapType {
|
|
|
80
80
|
id: string;
|
|
81
81
|
name: string;
|
|
82
82
|
nameKey?: string;
|
|
83
|
-
/**
|
|
83
|
+
/** 选中态左上角“路网”文案(可选,未配置时走 i18n 默认 key) */
|
|
84
84
|
placeNameLabel?: string;
|
|
85
|
-
/**
|
|
85
|
+
/** 选中态左上角“路网”文案 i18n key(可选) */
|
|
86
86
|
placeNameLabelKey?: string;
|
|
87
|
-
/**
|
|
87
|
+
/** 是否强制始终显示路网层(不受 placeName 开关影响) */
|
|
88
88
|
forcePlaceName?: boolean;
|
|
89
89
|
thumbnail: string;
|
|
90
90
|
provider: (token: string) => Cesium.ImageryProvider[];
|
|
@@ -11,6 +11,7 @@ import { MapPolygon, PolygonOptions } from './overlay/MapPolygon';
|
|
|
11
11
|
import { MapRectangle, RectangleOptions } from './overlay/MapRectangle';
|
|
12
12
|
import { MapCircle, CircleOptions } from './overlay/MapCircle';
|
|
13
13
|
import { MapRing, RingOptions } from './overlay/MapRing';
|
|
14
|
+
import { OverlayEditOptions } from './overlay/OverlayEditHandles';
|
|
14
15
|
export interface CesiumOverlayServiceOptions {
|
|
15
16
|
/**
|
|
16
17
|
* 是否启用实体 hover 处理器(MOUSE_MOVE 下会执行 pick/drillPick 并触发 hover 高亮)。
|
|
@@ -23,6 +24,14 @@ export interface CesiumOverlayServiceOptions {
|
|
|
23
24
|
* 参数为“已回写后的覆盖物 entity”。
|
|
24
25
|
*/
|
|
25
26
|
onOverlayEditChange?: (entity: DrawEntity & OverlayEntity) => void;
|
|
27
|
+
/**
|
|
28
|
+
* 点击 pick 节流间隔(毫秒)。
|
|
29
|
+
* 用于降低 “贴地几何 + pick + ground pipeline” 的偶发 DataCloneError 风险。
|
|
30
|
+
* @default 120
|
|
31
|
+
*/
|
|
32
|
+
clickPickMinIntervalMs?: number;
|
|
33
|
+
/** 编辑功能配置项,默认为全开(除 rotate) */
|
|
34
|
+
overlayEditOptions?: OverlayEditOptions;
|
|
26
35
|
}
|
|
27
36
|
/**
|
|
28
37
|
* Cesium 覆盖物服务类
|
|
@@ -42,12 +51,11 @@ export declare class CesiumOverlayService {
|
|
|
42
51
|
private hoverPickPos;
|
|
43
52
|
private overlayMutationRevision;
|
|
44
53
|
private hoverSuspendUntil;
|
|
45
|
-
private lastHoverPickTime;
|
|
46
|
-
private lastHoverPickPos;
|
|
47
54
|
private bulkUpdateDepth;
|
|
48
|
-
private
|
|
49
|
-
private
|
|
55
|
+
private readonly clickPickMinIntervalMs;
|
|
56
|
+
private readonly pickGovernor;
|
|
50
57
|
private static readonly HOVER_SUSPEND_AFTER_MUTATION_MS;
|
|
58
|
+
private static readonly CLICK_PICK_MIN_INTERVAL_MS;
|
|
51
59
|
private markOverlayMutated;
|
|
52
60
|
/**
|
|
53
61
|
* 显式开始一次批量更新:在 begin/end 期间暂停 hover pick。
|
|
@@ -80,11 +88,6 @@ export declare class CesiumOverlayService {
|
|
|
80
88
|
readonly circle: MapCircle;
|
|
81
89
|
readonly ring: MapRing;
|
|
82
90
|
constructor(viewer: Viewer, options?: CesiumOverlayServiceOptions);
|
|
83
|
-
/**
|
|
84
|
-
* Cesium 默认可能无法 pick 到半透明覆盖物(例如 alpha < 1 的填充面)。
|
|
85
|
-
* 开启 pickTranslucentDepth 后,hover/click 才能稳定命中半透明面。
|
|
86
|
-
*/
|
|
87
|
-
private enableTranslucentPicking;
|
|
88
91
|
/**
|
|
89
92
|
* 尝试从屏幕坐标拾取地表/模型位置并转为 Cartographic
|
|
90
93
|
*/
|
|
@@ -118,8 +121,10 @@ export declare class CesiumOverlayService {
|
|
|
118
121
|
* 开启/关闭覆盖物编辑模式。
|
|
119
122
|
* - 开启后:点击覆盖物会进入编辑,并显示可拖拽控制点。
|
|
120
123
|
* - 关闭后:退出编辑并移除控制点。
|
|
124
|
+
* @param enabled 是否启用编辑模式
|
|
125
|
+
* @param overlayEditOptions 编辑功能配置项,可选。不传时使用构造函数传入的配置或默认配置
|
|
121
126
|
*/
|
|
122
|
-
setOverlayEditMode(enabled: boolean): void;
|
|
127
|
+
setOverlayEditMode(enabled: boolean, overlayEditOptions?: OverlayEditOptions): void;
|
|
123
128
|
/** 当前是否处于覆盖物编辑模式(全局开关) */
|
|
124
129
|
getOverlayEditModeEnabled(): boolean;
|
|
125
130
|
/** 停止当前正在编辑的覆盖物(不会关闭全局编辑模式) */
|
|
@@ -128,7 +133,7 @@ export declare class CesiumOverlayService {
|
|
|
128
133
|
* 主动开始编辑某个覆盖物。
|
|
129
134
|
* @returns true 表示成功进入编辑
|
|
130
135
|
*/
|
|
131
|
-
startOverlayEdit(entityOrId: (DrawEntity & OverlayEntity) | string): boolean;
|
|
136
|
+
startOverlayEdit(entityOrId: (DrawEntity & OverlayEntity) | string, options?: OverlayEditOptions): boolean;
|
|
132
137
|
/**
|
|
133
138
|
* 设置实体 hover 高亮处理器(鼠标移入高亮,移出取消)
|
|
134
139
|
*/
|
|
@@ -66,6 +66,7 @@ export interface PointClusterLayerOptions {
|
|
|
66
66
|
}
|
|
67
67
|
export default class CesiumPointClusterLayer {
|
|
68
68
|
private static readonly CLUSTER_STYLE_MIN_INTERVAL_MS;
|
|
69
|
+
private static readonly CLICK_PICK_MIN_INTERVAL_MS;
|
|
69
70
|
private viewer;
|
|
70
71
|
private readonly options;
|
|
71
72
|
private dataSource;
|
|
@@ -76,6 +77,7 @@ export default class CesiumPointClusterLayer {
|
|
|
76
77
|
private clusterStyleRAF;
|
|
77
78
|
private clusterStyleTimer;
|
|
78
79
|
private lastClusterStyleFlushTime;
|
|
80
|
+
private readonly pickGovernor;
|
|
79
81
|
constructor(viewer: Viewer, options?: PointClusterLayerOptions);
|
|
80
82
|
/** 设置/替换点数据(经纬度单位:度) */
|
|
81
83
|
setData(points: ClusterPoint[]): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type PickGovernorKind = 'hover' | 'click' | 'cluster' | 'draw' | 'edit';
|
|
2
|
+
export interface PickGovernorProfile {
|
|
3
|
+
minIntervalMs: number;
|
|
4
|
+
minMovePx: number;
|
|
5
|
+
}
|
|
6
|
+
export interface PickGovernorOptions {
|
|
7
|
+
profiles?: Partial<Record<PickGovernorKind, Partial<PickGovernorProfile>>>;
|
|
8
|
+
}
|
|
9
|
+
type PointLike = {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
export declare function isMacPlatform(): boolean;
|
|
14
|
+
export declare class PickGovernor {
|
|
15
|
+
private readonly profiles;
|
|
16
|
+
private readonly lastByKind;
|
|
17
|
+
private suspendUntil;
|
|
18
|
+
constructor(options?: PickGovernorOptions);
|
|
19
|
+
shouldPick(kind: PickGovernorKind, point: PointLike, nowMs?: number): boolean;
|
|
20
|
+
suspend(ms: number): void;
|
|
21
|
+
private isFinitePoint;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -29,6 +29,8 @@ export interface CircleOptions {
|
|
|
29
29
|
* - false:填充与边框都使用 position 高度悬空。
|
|
30
30
|
*/
|
|
31
31
|
clampToGround?: boolean;
|
|
32
|
+
/** 贴地抬高量(米,clampToGround=true 时生效) */
|
|
33
|
+
groundHeightEpsilon?: number;
|
|
32
34
|
heightReference?: HeightReference;
|
|
33
35
|
extrudedHeight?: number;
|
|
34
36
|
heightEpsilon?: number;
|
|
@@ -23,6 +23,8 @@ export interface PolygonOptions {
|
|
|
23
23
|
* - false:填充与边框都在统一的 baseHeight 上悬空。
|
|
24
24
|
*/
|
|
25
25
|
clampToGround?: boolean;
|
|
26
|
+
/** 贴地抬高量(米,clampToGround=true 时生效) */
|
|
27
|
+
groundHeightEpsilon?: number;
|
|
26
28
|
heightReference?: HeightReference;
|
|
27
29
|
extrudedHeight?: number;
|
|
28
30
|
/** 点击该覆盖物时是否高亮显示(默认 false)。支持传入自定义颜色等参数 */
|
|
@@ -9,6 +9,8 @@ export interface PolylineOptions {
|
|
|
9
9
|
width?: number;
|
|
10
10
|
material?: Cesium.MaterialProperty | Color | string;
|
|
11
11
|
clampToGround?: boolean;
|
|
12
|
+
/** 贴地抬高量(米,clampToGround=true 时生效) */
|
|
13
|
+
groundHeightEpsilon?: number;
|
|
12
14
|
/** 点击该覆盖物时是否高亮显示(默认 false)。支持传入自定义颜色等参数 */
|
|
13
15
|
clickHighlight?: boolean | {
|
|
14
16
|
color?: Color | string;
|
|
@@ -28,6 +30,7 @@ export interface PolylineOptions {
|
|
|
28
30
|
export declare class MapPolyline {
|
|
29
31
|
private viewer;
|
|
30
32
|
private entities;
|
|
33
|
+
private readonly avoidGroundPipeline;
|
|
31
34
|
constructor(viewer: Viewer);
|
|
32
35
|
/**
|
|
33
36
|
* 转换位置为 Cartesian3
|
|
@@ -41,6 +44,7 @@ export declare class MapPolyline {
|
|
|
41
44
|
* 解析材质
|
|
42
45
|
*/
|
|
43
46
|
private resolveMaterial;
|
|
47
|
+
private elevatePositions;
|
|
44
48
|
/**
|
|
45
49
|
* 添加 Polyline(折线)
|
|
46
50
|
*/
|
|
@@ -19,6 +19,8 @@ export interface RectangleOptions {
|
|
|
19
19
|
outlineWidth?: number;
|
|
20
20
|
/** 是否贴地(默认:在粗边框模式下为 true) */
|
|
21
21
|
clampToGround?: boolean;
|
|
22
|
+
/** 贴地抬高量(米,clampToGround=true 时生效) */
|
|
23
|
+
groundHeightEpsilon?: number;
|
|
22
24
|
/** 悬空时的基准高度(米,clampToGround=false 时有效) */
|
|
23
25
|
height?: number;
|
|
24
26
|
heightReference?: HeightReference;
|
|
@@ -36,6 +36,8 @@ export interface RingOptions {
|
|
|
36
36
|
glowPower?: number;
|
|
37
37
|
/** 是否贴地(默认 true) */
|
|
38
38
|
clampToGround?: boolean;
|
|
39
|
+
/** 贴地抬高量(米,clampToGround=true 时生效) */
|
|
40
|
+
groundHeightEpsilon?: number;
|
|
39
41
|
/** 圆环分段数(默认 128),越大越圆滑 */
|
|
40
42
|
segments?: number;
|
|
41
43
|
/** 覆盖物点击回调 */
|
|
@@ -93,7 +95,7 @@ export declare class MapRing {
|
|
|
93
95
|
/**
|
|
94
96
|
* 更新 Ring 样式
|
|
95
97
|
*/
|
|
96
|
-
updateStyle(entity: Entity, options: Partial<Pick<RingOptions, "color" | "showInnerLine" | "lineColor" | "lineStyle" | "lineMaterialMode" | "stripeRepeat" | "dashLength" | "dashPattern" | "gapColor" | "width" | "glowWidth" | "lineWidth" | "glowPower" | "clampToGround" | "segments">>): void;
|
|
98
|
+
updateStyle(entity: Entity, options: Partial<Pick<RingOptions, "color" | "showInnerLine" | "lineColor" | "lineStyle" | "lineMaterialMode" | "stripeRepeat" | "dashLength" | "dashPattern" | "gapColor" | "width" | "glowWidth" | "lineWidth" | "glowPower" | "clampToGround" | "segments" | "groundHeightEpsilon">>): void;
|
|
97
99
|
/**
|
|
98
100
|
* 显示/隐藏 Ring
|
|
99
101
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Viewer } from '../../../node_modules/cesium';
|
|
2
2
|
import { DrawEntity } from '../drawHelper';
|
|
3
3
|
import { OverlayEntity } from './types';
|
|
4
|
+
import { OverlayEditOptions } from './OverlayEditHandles';
|
|
4
5
|
import * as Cesium from "cesium";
|
|
5
6
|
export type OverlayEditChangeCallback = (entity: DrawEntity & OverlayEntity) => void;
|
|
6
7
|
export interface OverlayEditControllerOptions {
|
|
@@ -9,6 +10,8 @@ export interface OverlayEditControllerOptions {
|
|
|
9
10
|
* 回调参数为“已回写后的覆盖物 entity”。
|
|
10
11
|
*/
|
|
11
12
|
onChange?: OverlayEditChangeCallback;
|
|
13
|
+
/** 编辑功能配置项,默认为全开(除 rotate) */
|
|
14
|
+
overlayEditOptions?: OverlayEditOptions;
|
|
12
15
|
}
|
|
13
16
|
export interface OverlayEditHost {
|
|
14
17
|
getViewer(): Viewer;
|
|
@@ -27,13 +30,19 @@ export interface OverlayEditHost {
|
|
|
27
30
|
applyPolylinePositions(entity: DrawEntity & OverlayEntity, positions: Cesium.Cartesian3[]): void;
|
|
28
31
|
applyPointPosition(entity: DrawEntity & OverlayEntity, position: Cesium.Cartesian3): void;
|
|
29
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* 覆盖物编辑控制器类,用于管理地图上覆盖物的编辑操作
|
|
35
|
+
* 支持多边形、矩形、圆形、折线和点等类型的编辑
|
|
36
|
+
*/
|
|
30
37
|
export declare class OverlayEditController {
|
|
31
38
|
private readonly host;
|
|
32
39
|
private enabled;
|
|
33
40
|
private handler;
|
|
41
|
+
private readonly pickGovernor;
|
|
34
42
|
private onChange;
|
|
35
43
|
private editingTarget;
|
|
36
44
|
private editingKind;
|
|
45
|
+
private editingOptions;
|
|
37
46
|
private editingPositions;
|
|
38
47
|
private editingCircleCenter;
|
|
39
48
|
private editingCircleRadiusMeters;
|
|
@@ -49,11 +58,36 @@ export declare class OverlayEditController {
|
|
|
49
58
|
private rotateStartAngle;
|
|
50
59
|
private scaleStartDistance;
|
|
51
60
|
private cameraBackup;
|
|
61
|
+
/**
|
|
62
|
+
* 构造函数
|
|
63
|
+
* @param host 覆盖物编辑宿主对象
|
|
64
|
+
* @param options 配置选项
|
|
65
|
+
*/
|
|
52
66
|
constructor(host: OverlayEditHost, options?: OverlayEditControllerOptions);
|
|
67
|
+
/**
|
|
68
|
+
* 设置编辑变化回调函数
|
|
69
|
+
* @param cb 回调函数
|
|
70
|
+
*/
|
|
53
71
|
setOnChange(cb?: OverlayEditChangeCallback | null): void;
|
|
54
|
-
|
|
72
|
+
/**
|
|
73
|
+
* 设置编辑器启用状态
|
|
74
|
+
* @param enabled 是否启用
|
|
75
|
+
* @param options 编辑功能配置项,可选。不传时使用构造函数传入的配置或默认配置
|
|
76
|
+
*/
|
|
77
|
+
setEnabled(enabled: boolean, options?: OverlayEditOptions): void;
|
|
78
|
+
/**
|
|
79
|
+
* 获取编辑器启用状态
|
|
80
|
+
* @returns 是否启用
|
|
81
|
+
*/
|
|
55
82
|
getEnabled(): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* 判断是否正在编辑
|
|
85
|
+
* @returns 是否正在编辑
|
|
86
|
+
*/
|
|
56
87
|
isEditing(): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* 销毁编辑器
|
|
90
|
+
*/
|
|
57
91
|
destroy(): void;
|
|
58
92
|
/** 停止当前正在编辑的覆盖物(不会关闭全局编辑模式) */
|
|
59
93
|
stop(): void;
|
|
@@ -61,7 +95,12 @@ export declare class OverlayEditController {
|
|
|
61
95
|
* 主动开始编辑某个覆盖物。
|
|
62
96
|
* @returns true 表示成功进入编辑
|
|
63
97
|
*/
|
|
64
|
-
start(entityOrId: (DrawEntity & OverlayEntity) | string): boolean;
|
|
98
|
+
start(entityOrId: (DrawEntity & OverlayEntity) | string, options?: OverlayEditOptions): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* 解析编辑目标实体,根据特定条件返回合适的实体对象
|
|
101
|
+
* @param entity 输入的实体对象,需要同时满足DrawEntity和OverlayEntity类型
|
|
102
|
+
* @returns 返回解析后的实体对象,可能是原始实体或符合条件的其他实体
|
|
103
|
+
*/
|
|
65
104
|
private resolveEditTarget;
|
|
66
105
|
private detectEditableKind;
|
|
67
106
|
private getPropertyValue;
|
|
@@ -95,6 +134,10 @@ export declare class OverlayEditController {
|
|
|
95
134
|
private lockCameraController;
|
|
96
135
|
private restoreCameraController;
|
|
97
136
|
private clearHandles;
|
|
137
|
+
/**
|
|
138
|
+
* 重建处理句柄的方法
|
|
139
|
+
* 根据当前编辑的几何图形类型,调用相应的构建函数创建处理句柄
|
|
140
|
+
*/
|
|
98
141
|
private rebuildHandles;
|
|
99
142
|
private getHandleHelpers;
|
|
100
143
|
private createHandle;
|
|
@@ -11,6 +11,44 @@ export type HandleStyle = {
|
|
|
11
11
|
* 创建编辑句柄实体
|
|
12
12
|
*/
|
|
13
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;
|
|
14
52
|
/**
|
|
15
53
|
* 构建/更新句柄所需的依赖函数集合
|
|
16
54
|
*/
|
|
@@ -24,23 +62,23 @@ export interface HandleHelpers {
|
|
|
24
62
|
/**
|
|
25
63
|
* 构建多边形编辑句柄(顶点/中点/整体移动)
|
|
26
64
|
*/
|
|
27
|
-
export declare function buildPolygonHandles(verts: Cesium.Cartesian3[], helpers: HandleHelpers): Cesium.Entity[];
|
|
65
|
+
export declare function buildPolygonHandles(verts: Cesium.Cartesian3[], helpers: HandleHelpers, options: OverlayEditOptions): Cesium.Entity[];
|
|
28
66
|
/**
|
|
29
67
|
* 构建矩形编辑句柄(顶点/边中点/整体移动)
|
|
30
68
|
*/
|
|
31
|
-
export declare function buildRectangleHandles(verts: Cesium.Cartesian3[], helpers: HandleHelpers): Cesium.Entity[];
|
|
69
|
+
export declare function buildRectangleHandles(verts: Cesium.Cartesian3[], helpers: HandleHelpers, options: OverlayEditOptions): Cesium.Entity[];
|
|
32
70
|
/**
|
|
33
71
|
* 构建折线编辑句柄(顶点/中点/整体移动/旋转/缩放)
|
|
34
72
|
*/
|
|
35
|
-
export declare function buildPolylineHandles(verts: Cesium.Cartesian3[], helpers: HandleHelpers): Cesium.Entity[];
|
|
73
|
+
export declare function buildPolylineHandles(verts: Cesium.Cartesian3[], helpers: HandleHelpers, options: OverlayEditOptions): Cesium.Entity[];
|
|
36
74
|
/**
|
|
37
75
|
* 构建点编辑句柄
|
|
38
76
|
*/
|
|
39
|
-
export declare function buildPointHandles(pos: Cesium.Cartesian3 | null, helpers: HandleHelpers): Cesium.Entity[];
|
|
77
|
+
export declare function buildPointHandles(pos: Cesium.Cartesian3 | null, helpers: HandleHelpers, options: OverlayEditOptions): Cesium.Entity[];
|
|
40
78
|
/**
|
|
41
79
|
* 构建圆形编辑句柄(圆心/半径)
|
|
42
80
|
*/
|
|
43
|
-
export declare function buildCircleHandles(center: Cesium.Cartesian3 | null, radiusMeters: number, helpers: HandleHelpers): Cesium.Entity[];
|
|
81
|
+
export declare function buildCircleHandles(center: Cesium.Cartesian3 | null, radiusMeters: number, helpers: HandleHelpers, options: OverlayEditOptions): Cesium.Entity[];
|
|
44
82
|
/**
|
|
45
83
|
* 更新多边形句柄位置
|
|
46
84
|
* @returns false 表示句柄数量不匹配,需重建
|
|
@@ -36,6 +36,7 @@ export declare class CirclePrimitiveBatch {
|
|
|
36
36
|
setColors(circleId: string, ringColor: Cesium.Color, fillColor: Cesium.Color): void;
|
|
37
37
|
private scheduleApplyColors;
|
|
38
38
|
private scheduleRebuild;
|
|
39
|
+
private assertCloneableInstanceId;
|
|
39
40
|
private rebuild;
|
|
40
41
|
private applyCurrentColors;
|
|
41
42
|
}
|
|
@@ -37,6 +37,7 @@ export declare class PolygonPrimitiveBatch {
|
|
|
37
37
|
private scheduleApplyColors;
|
|
38
38
|
setBorderWidth(polygonId: string, borderWidth: number): void;
|
|
39
39
|
private scheduleRebuild;
|
|
40
|
+
private assertCloneableInstanceId;
|
|
40
41
|
private rebuild;
|
|
41
42
|
private applyCurrentColors;
|
|
42
43
|
}
|
|
@@ -35,6 +35,7 @@ export declare class RectanglePrimitiveBatch {
|
|
|
35
35
|
setColors(rectangleId: string, ringColor: Cesium.Color, fillColor: Cesium.Color): void;
|
|
36
36
|
private scheduleApplyColors;
|
|
37
37
|
private scheduleRebuild;
|
|
38
|
+
private assertCloneableInstanceId;
|
|
38
39
|
private rebuild;
|
|
39
40
|
private applyCurrentColors;
|
|
40
41
|
}
|
|
@@ -87,6 +87,8 @@ export interface OverlayEntity extends Entity {
|
|
|
87
87
|
_clampToGround?: boolean;
|
|
88
88
|
/** 复合形状的基准高度(米,clampToGround=false 时有效) */
|
|
89
89
|
_baseHeight?: number;
|
|
90
|
+
/** 贴地抬高量(米,clampToGround=true 时有效) */
|
|
91
|
+
_groundHeightEpsilon?: number;
|
|
90
92
|
_isThickOutline?: boolean;
|
|
91
93
|
_outlineWidth?: number;
|
|
92
94
|
_isRing?: boolean;
|
|
@@ -35,7 +35,7 @@ export declare class MapLayersService {
|
|
|
35
35
|
private useI18n;
|
|
36
36
|
constructor(viewer: Viewer, toolbarElement: HTMLElement, config: MapLayersServiceConfig);
|
|
37
37
|
/**
|
|
38
|
-
* 初始化当前地图上下文:用于“初始底图不是通过 switchMapType
|
|
38
|
+
* 初始化当前地图上下文:用于“初始底图不是通过 switchMapType 加载”时的路网层识别。
|
|
39
39
|
*/
|
|
40
40
|
private bootstrapCurrentMapContext;
|
|
41
41
|
/**
|
package/dist/package.json
CHANGED
package/package.json
CHANGED