@xingm/vmap-cesium-toolbar 0.0.3-alpha.2 → 0.0.3-alpha.4
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 +2 -0
- package/dist/index.es.js +1447 -1272
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +8 -8
- package/dist/index.umd.js.map +1 -1
- package/dist/libs/CesiumMapDraw.d.ts +10 -0
- package/dist/libs/CesiumOverlayService.d.ts +7 -25
- package/dist/libs/drawHelper/DrawCircle.d.ts +1 -0
- package/dist/libs/drawHelper/DrawHint.d.ts +3 -3
- package/dist/libs/{overlay → overlay-edit}/OverlayEditController.d.ts +18 -21
- package/dist/libs/overlay-edit/OverlayEditHandles.d.ts +63 -0
- package/dist/libs/overlay-edit/OverlayHighlight.d.ts +40 -0
- package/dist/package.json +46 -0
- package/dist/style.css +162 -0
- package/package.json +1 -1
|
@@ -73,6 +73,11 @@ declare class DrawHelper {
|
|
|
73
73
|
* @param viewer Cesium Viewer 实例
|
|
74
74
|
*/
|
|
75
75
|
constructor(viewer: Cesium.Viewer);
|
|
76
|
+
/**
|
|
77
|
+
* 检测并输出可能存在高度限制问题的实体信息
|
|
78
|
+
* @param tag 标识本次检测的唯一标签
|
|
79
|
+
* @returns 返回包含检测结果的报告对象
|
|
80
|
+
*/
|
|
76
81
|
private dumpPotentialClampingEntities;
|
|
77
82
|
/**
|
|
78
83
|
* 对新创建的实体进行净化处理,确保其符合渲染要求
|
|
@@ -85,6 +90,11 @@ declare class DrawHelper {
|
|
|
85
90
|
* 这是一个私有方法,主要用于拦截和修改Cesium中EntityCollection的add方法
|
|
86
91
|
*/
|
|
87
92
|
private installEntitiesAddHook;
|
|
93
|
+
/**
|
|
94
|
+
* 卸载实体集合添加钩子函数
|
|
95
|
+
* 该方法用于移除之前添加到EntityCollection原型中的自定义add方法
|
|
96
|
+
* 恢复原始的add方法实现
|
|
97
|
+
*/
|
|
88
98
|
private uninstallEntitiesAddHook;
|
|
89
99
|
/**
|
|
90
100
|
* 安装地面几何更新器调试钩子
|
|
@@ -36,6 +36,7 @@ export declare class CesiumOverlayService {
|
|
|
36
36
|
/** 构造参数(用于开关 hover handler 等运行时策略) */
|
|
37
37
|
private readonly options;
|
|
38
38
|
private overlayEditor;
|
|
39
|
+
private overlayHighlight;
|
|
39
40
|
private lastHoverTargets;
|
|
40
41
|
private hoverPickRAF;
|
|
41
42
|
private hoverPickPos;
|
|
@@ -44,10 +45,6 @@ export declare class CesiumOverlayService {
|
|
|
44
45
|
private lastHoverPickTime;
|
|
45
46
|
private lastHoverPickPos;
|
|
46
47
|
private bulkUpdateDepth;
|
|
47
|
-
private static readonly DEFAULT_HIGHLIGHT_COLOR;
|
|
48
|
-
private static readonly DEFAULT_HIGHLIGHT_FILL_ALPHA;
|
|
49
|
-
private static readonly DEFAULT_HIGHLIGHT_GLOW_POWER;
|
|
50
|
-
private static readonly GLOW_OUTLINE_ROOT_ID_PROP;
|
|
51
48
|
private static readonly HOVER_PICK_MIN_INTERVAL_MS;
|
|
52
49
|
private static readonly HOVER_PICK_MIN_MOVE_PX;
|
|
53
50
|
private static readonly HOVER_SUSPEND_AFTER_MUTATION_MS;
|
|
@@ -70,17 +67,6 @@ export declare class CesiumOverlayService {
|
|
|
70
67
|
* 需要映射回 overlayMap 内的根覆盖物 id。
|
|
71
68
|
*/
|
|
72
69
|
private normalizeOverlayPickId;
|
|
73
|
-
private getEntityPropertyString;
|
|
74
|
-
private mapGlowOutlineEntityToRoot;
|
|
75
|
-
private getClosedPositions;
|
|
76
|
-
private generateEllipseOutlinePositions;
|
|
77
|
-
/**
|
|
78
|
-
* 确保发光轮廓效果
|
|
79
|
-
* @param root - 根覆盖物实体
|
|
80
|
-
* @param color - 发光颜色
|
|
81
|
-
*/
|
|
82
|
-
private ensureGlowOutline;
|
|
83
|
-
private removeGlowOutline;
|
|
84
70
|
private resolveOverlayByPickId;
|
|
85
71
|
private resolvePickedOverlayEntity;
|
|
86
72
|
readonly marker: MapMarker;
|
|
@@ -122,6 +108,12 @@ export declare class CesiumOverlayService {
|
|
|
122
108
|
* 设置实体点击处理器
|
|
123
109
|
*/
|
|
124
110
|
private setupEntityClickHandler;
|
|
111
|
+
/**
|
|
112
|
+
* 开启或是关闭覆盖物的Hover高亮(鼠标移入高亮,移出取消)。
|
|
113
|
+
* - 开启后:覆盖物会触发高亮,且高亮状态会在鼠标移出时取消。
|
|
114
|
+
* - 关闭后:覆盖物不再触发 hover 高亮。
|
|
115
|
+
*/
|
|
116
|
+
toggleOverlayHoverHighlight(enabled: boolean): void;
|
|
125
117
|
/**
|
|
126
118
|
* 开启/关闭覆盖物编辑模式。
|
|
127
119
|
* - 开启后:点击覆盖物会进入编辑,并显示可拖拽控制点。
|
|
@@ -143,16 +135,6 @@ export declare class CesiumOverlayService {
|
|
|
143
135
|
private setupEntityHoverHandler;
|
|
144
136
|
private getPropertyValue;
|
|
145
137
|
private getNumberProperty;
|
|
146
|
-
private resolveHighlightOptions;
|
|
147
|
-
private getActiveHighlightOptions;
|
|
148
|
-
private setOverlayHighlightReason;
|
|
149
|
-
private applyOverlayHighlightStyle;
|
|
150
|
-
/**
|
|
151
|
-
* 恢复覆盖物的高亮样式
|
|
152
|
-
* @param entity - 覆盖物实体对象
|
|
153
|
-
* @returns 无返回值
|
|
154
|
-
*/
|
|
155
|
-
private restoreOverlayHighlightStyle;
|
|
156
138
|
/**
|
|
157
139
|
* 生成唯一ID
|
|
158
140
|
*/
|
|
@@ -17,16 +17,16 @@ export declare class DrawHintHelper {
|
|
|
17
17
|
private drawHintOverrideUntil;
|
|
18
18
|
constructor(entities: Cesium.EntityCollection, getState: () => DrawHintState, translate: (key: string, params?: Record<string, any>) => string);
|
|
19
19
|
handleSceneModeChanged(): void;
|
|
20
|
-
setOverride(
|
|
20
|
+
setOverride(options: Cesium.LabelGraphics | Cesium.LabelGraphics.ConstructorOptions, ms?: number): void;
|
|
21
21
|
updatePosition(position: Cesium.Cartesian3): void;
|
|
22
22
|
refreshTextOnly(): void;
|
|
23
23
|
clear(): void;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* 获取绘图提示文本的公共方法
|
|
26
26
|
* 根据当前的绘图状态和模式返回相应的提示信息
|
|
27
27
|
* @returns {string} 返回对应的提示文本,如果不在绘图状态则返回空字符串
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
getDrawHintText(): string;
|
|
30
30
|
private toHintDisplayPosition;
|
|
31
31
|
}
|
|
32
32
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Viewer } from '../../../node_modules/cesium';
|
|
2
2
|
import { DrawEntity } from '../drawHelper';
|
|
3
|
-
import { OverlayEntity } from '
|
|
3
|
+
import { OverlayEntity } from '../overlay/types';
|
|
4
4
|
import * as Cesium from "cesium";
|
|
5
5
|
export type OverlayEditChangeCallback = (entity: DrawEntity & OverlayEntity) => void;
|
|
6
6
|
export interface OverlayEditControllerOptions {
|
|
@@ -62,6 +62,7 @@ export declare class OverlayEditController {
|
|
|
62
62
|
* @returns true 表示成功进入编辑
|
|
63
63
|
*/
|
|
64
64
|
start(entityOrId: (DrawEntity & OverlayEntity) | string): boolean;
|
|
65
|
+
private resolveEditTarget;
|
|
65
66
|
private detectEditableKind;
|
|
66
67
|
private getPropertyValue;
|
|
67
68
|
private getNumberProperty;
|
|
@@ -72,21 +73,22 @@ export declare class OverlayEditController {
|
|
|
72
73
|
private getEditablePointPosition;
|
|
73
74
|
private getEditableRectangle;
|
|
74
75
|
private getEditableCircleInfo;
|
|
75
|
-
/**
|
|
76
|
-
* 确保编辑处理器已初始化
|
|
77
|
-
* 如果处理器不存在,则创建一个新的 ScreenSpaceEventHandler 并设置各种交互事件处理函数
|
|
78
|
-
* @private
|
|
79
|
-
*/
|
|
80
|
-
/**
|
|
81
|
-
* 确保事件处理器已初始化
|
|
82
|
-
* 如果处理器不存在,则创建并设置各种事件处理函数
|
|
83
|
-
* @private
|
|
84
|
-
*/
|
|
85
76
|
/**
|
|
86
77
|
* 确保屏幕空间事件处理器已初始化
|
|
87
78
|
* 如果处理器不存在,则创建一个新的处理器并设置各种交互事件
|
|
88
79
|
*/
|
|
89
80
|
private ensureHandler;
|
|
81
|
+
private beginDrag;
|
|
82
|
+
private beginMoveDrag;
|
|
83
|
+
private computeMovedPositions;
|
|
84
|
+
private emitChange;
|
|
85
|
+
private prepareOnChangeTarget;
|
|
86
|
+
private resolveOverlayTypeFromId;
|
|
87
|
+
private attachMarkerLngLat;
|
|
88
|
+
private attachPolylineLngLat;
|
|
89
|
+
private attachCircleLngLat;
|
|
90
|
+
private attachPolygonLngLat;
|
|
91
|
+
private attachRectangleLngLat;
|
|
90
92
|
private captureDragSnapshot;
|
|
91
93
|
private isGeometryChangedSinceSnapshot;
|
|
92
94
|
private destroyHandler;
|
|
@@ -94,17 +96,8 @@ export declare class OverlayEditController {
|
|
|
94
96
|
private restoreCameraController;
|
|
95
97
|
private clearHandles;
|
|
96
98
|
private rebuildHandles;
|
|
99
|
+
private getHandleHelpers;
|
|
97
100
|
private createHandle;
|
|
98
|
-
private buildPolygonHandles;
|
|
99
|
-
private buildRectangleHandles;
|
|
100
|
-
private buildPolylineHandles;
|
|
101
|
-
private buildPointHandles;
|
|
102
|
-
private buildCircleHandles;
|
|
103
|
-
private updatePolygonHandlePositions;
|
|
104
|
-
private updateRectangleHandlePositions;
|
|
105
|
-
private updatePolylineHandlePositions;
|
|
106
|
-
private updatePointHandlePositions;
|
|
107
|
-
private updateCircleHandlePositions;
|
|
108
101
|
private applyEditedPolygon;
|
|
109
102
|
private applyEditedRectangle;
|
|
110
103
|
private applyEditedCircle;
|
|
@@ -112,10 +105,14 @@ export declare class OverlayEditController {
|
|
|
112
105
|
private applyEditedPoint;
|
|
113
106
|
private getEditingClampToGround;
|
|
114
107
|
private getCartesianHeight;
|
|
108
|
+
private convertOutlineToLngLat;
|
|
109
|
+
private convertPositionToLngLat;
|
|
110
|
+
private convertCartoToLngLat;
|
|
115
111
|
private pickCartesianOnGlobe;
|
|
116
112
|
private computeSurfaceDistanceMeters;
|
|
117
113
|
private circleRadiusHandlePosition;
|
|
118
114
|
private rectangleToPositions;
|
|
115
|
+
private rectangleToLngLatPositions;
|
|
119
116
|
private positionsToRectangle;
|
|
120
117
|
private getRectangleEditHeight;
|
|
121
118
|
private computePolygonCenterCartesian;
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
/**
|
|
15
|
+
* 构建/更新句柄所需的依赖函数集合
|
|
16
|
+
*/
|
|
17
|
+
export interface HandleHelpers {
|
|
18
|
+
createHandle: CreateHandle;
|
|
19
|
+
computePolygonCenterCartesian: (positions: Cesium.Cartesian3[]) => Cesium.Cartesian3;
|
|
20
|
+
computePolylineHandleRadius: (positions: Cesium.Cartesian3[], center: Cesium.Cartesian3) => number;
|
|
21
|
+
offsetByMeters: (center: Cesium.Cartesian3, meters: number, bearingDeg: number) => Cesium.Cartesian3;
|
|
22
|
+
circleRadiusHandlePosition: (center: Cesium.Cartesian3, radiusMeters: number) => Cesium.Cartesian3;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 构建多边形编辑句柄(顶点/中点/整体移动)
|
|
26
|
+
*/
|
|
27
|
+
export declare function buildPolygonHandles(verts: Cesium.Cartesian3[], helpers: HandleHelpers): Cesium.Entity[];
|
|
28
|
+
/**
|
|
29
|
+
* 构建矩形编辑句柄(顶点/边中点/整体移动)
|
|
30
|
+
*/
|
|
31
|
+
export declare function buildRectangleHandles(verts: Cesium.Cartesian3[], helpers: HandleHelpers): Cesium.Entity[];
|
|
32
|
+
/**
|
|
33
|
+
* 构建折线编辑句柄(顶点/中点/整体移动/旋转/缩放)
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildPolylineHandles(verts: Cesium.Cartesian3[], helpers: HandleHelpers): Cesium.Entity[];
|
|
36
|
+
/**
|
|
37
|
+
* 构建点编辑句柄
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildPointHandles(pos: Cesium.Cartesian3 | null, helpers: HandleHelpers): Cesium.Entity[];
|
|
40
|
+
/**
|
|
41
|
+
* 构建圆形编辑句柄(圆心/半径)
|
|
42
|
+
*/
|
|
43
|
+
export declare function buildCircleHandles(center: Cesium.Cartesian3 | null, radiusMeters: number, helpers: HandleHelpers): Cesium.Entity[];
|
|
44
|
+
/**
|
|
45
|
+
* 更新多边形句柄位置
|
|
46
|
+
* @returns false 表示句柄数量不匹配,需重建
|
|
47
|
+
*/
|
|
48
|
+
export declare function updatePolygonHandlePositions(verts: Cesium.Cartesian3[], handles: Cesium.Entity[], helpers: HandleHelpers): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* 更新折线句柄位置
|
|
51
|
+
* @returns false 表示句柄数量不匹配,需重建
|
|
52
|
+
*/
|
|
53
|
+
export declare function updatePolylineHandlePositions(verts: Cesium.Cartesian3[], handles: Cesium.Entity[], helpers: HandleHelpers): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* 更新点句柄位置
|
|
56
|
+
* @returns false 表示句柄数量不匹配或参数为空
|
|
57
|
+
*/
|
|
58
|
+
export declare function updatePointHandlePositions(pos: Cesium.Cartesian3 | null, handles: Cesium.Entity[]): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* 更新圆形句柄位置
|
|
61
|
+
* @returns false 表示句柄数量不匹配或参数为空
|
|
62
|
+
*/
|
|
63
|
+
export declare function updateCircleHandlePositions(center: Cesium.Cartesian3 | null, radiusMeters: number, handles: Cesium.Entity[], helpers: HandleHelpers): boolean;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Entity } from '../../../node_modules/cesium';
|
|
2
|
+
import { DrawEntity } from '../drawHelper';
|
|
3
|
+
import { OverlayEntity } from '../overlay/types';
|
|
4
|
+
import { MapCircle } from '../overlay/MapCircle';
|
|
5
|
+
import { MapPolygon } from '../overlay/MapPolygon';
|
|
6
|
+
import { MapRectangle } from '../overlay/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
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xingm/vmap-cesium-toolbar",
|
|
3
|
+
"version": "0.0.3-alpha.4",
|
|
4
|
+
"description": "A powerful Cesium map toolbar plugin with drawing, measurement, and interaction features",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.es.js",
|
|
7
|
+
"module": "index.es.js",
|
|
8
|
+
"types": "index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"index.es.js",
|
|
11
|
+
"index.umd.js",
|
|
12
|
+
"index.d.ts",
|
|
13
|
+
"style.css",
|
|
14
|
+
"README.md",
|
|
15
|
+
"geojson"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"import": "./index.es.js",
|
|
20
|
+
"default": "./index.es.js"
|
|
21
|
+
},
|
|
22
|
+
"./style": "./style.css"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"vue": "^3.0.0"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"cesium",
|
|
29
|
+
"map",
|
|
30
|
+
"toolbar",
|
|
31
|
+
"drawing",
|
|
32
|
+
"measurement",
|
|
33
|
+
"vue3",
|
|
34
|
+
"typescript"
|
|
35
|
+
],
|
|
36
|
+
"author": "pengxueyou",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/BenXueYou/vmap-cesium-tool.git"
|
|
41
|
+
},
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/BenXueYou/vmap-cesium-tool/issues"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://github.com/BenXueYou/vmap-cesium-tool#readme"
|
|
46
|
+
}
|
package/dist/style.css
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/* VMap Cesium Toolbar Plugin Styles */
|
|
2
|
+
|
|
3
|
+
/* 工具栏基础样式 */
|
|
4
|
+
.cesium-map-toolbar {
|
|
5
|
+
position: absolute;
|
|
6
|
+
background: rgba(255, 255, 255, 0.95);
|
|
7
|
+
border: 1px solid #e0e0e0;
|
|
8
|
+
border-radius: 6px;
|
|
9
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
10
|
+
padding: 8px;
|
|
11
|
+
z-index: 1000;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: 8px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* 工具栏按钮样式 */
|
|
18
|
+
.cesium-toolbar-button {
|
|
19
|
+
width: 40px;
|
|
20
|
+
height: 40px;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
background: rgba(66, 133, 244, 0.4);
|
|
25
|
+
color: white;
|
|
26
|
+
border: none;
|
|
27
|
+
border-radius: 4px;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
font-size: 14px;
|
|
30
|
+
font-weight: bold;
|
|
31
|
+
transition: all 0.2s ease;
|
|
32
|
+
user-select: none;
|
|
33
|
+
position: relative;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.cesium-toolbar-button:hover {
|
|
37
|
+
background: rgba(51, 103, 214, 0.9);
|
|
38
|
+
transform: scale(1.05);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* 搜索容器样式 */
|
|
42
|
+
.search-container {
|
|
43
|
+
position: absolute;
|
|
44
|
+
background: white;
|
|
45
|
+
border: 1px solid #e0e0e0;
|
|
46
|
+
border-radius: 4px;
|
|
47
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
48
|
+
padding: 8px;
|
|
49
|
+
min-width: 200px;
|
|
50
|
+
z-index: 1001;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.search-container input {
|
|
54
|
+
padding: 6px 8px;
|
|
55
|
+
border: 1px solid #ddd;
|
|
56
|
+
border-radius: 3px;
|
|
57
|
+
font-size: 14px;
|
|
58
|
+
outline: none;
|
|
59
|
+
width: 100%;
|
|
60
|
+
box-sizing: border-box;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.search-results {
|
|
64
|
+
margin-top: 8px;
|
|
65
|
+
max-height: 200px;
|
|
66
|
+
overflow-y: auto;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.search-results > div {
|
|
70
|
+
padding: 8px;
|
|
71
|
+
border-bottom: 1px solid #f0f0f0;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
transition: background-color 0.2s;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.search-results > div:hover {
|
|
77
|
+
background-color: #f5f5f5;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* 测量菜单样式 */
|
|
81
|
+
.measurement-menu,
|
|
82
|
+
.layers-menu {
|
|
83
|
+
position: absolute;
|
|
84
|
+
background: white;
|
|
85
|
+
border: 1px solid #e0e0e0;
|
|
86
|
+
border-radius: 4px;
|
|
87
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
88
|
+
padding: 4px 0;
|
|
89
|
+
min-width: 120px;
|
|
90
|
+
z-index: 1001;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.layers-menu {
|
|
94
|
+
padding: 8px;
|
|
95
|
+
min-width: 200px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.measurement-menu > div,
|
|
99
|
+
.layers-menu > div {
|
|
100
|
+
padding: 8px 12px;
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
gap: 8px;
|
|
105
|
+
transition: background-color 0.2s;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.measurement-menu > div:hover,
|
|
109
|
+
.layers-menu > div:hover {
|
|
110
|
+
background-color: #f5f5f5;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* 图层菜单项样式 */
|
|
114
|
+
.layers-menu .map-type-item {
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
gap: 8px;
|
|
118
|
+
padding: 6px;
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
border-radius: 3px;
|
|
121
|
+
transition: background-color 0.2s;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.layers-menu .map-type-item:hover {
|
|
125
|
+
background-color: #f5f5f5;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.layers-menu .map-type-item.selected {
|
|
129
|
+
background-color: #e3f2fd;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.layers-menu .map-type-thumbnail {
|
|
133
|
+
width: 20px;
|
|
134
|
+
height: 20px;
|
|
135
|
+
border-radius: 2px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.layers-menu .map-type-checkmark {
|
|
139
|
+
color: #1976d2;
|
|
140
|
+
font-weight: bold;
|
|
141
|
+
margin-left: auto;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* 响应式设计 */
|
|
145
|
+
@media (max-width: 768px) {
|
|
146
|
+
.cesium-map-toolbar {
|
|
147
|
+
padding: 6px;
|
|
148
|
+
gap: 6px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.cesium-toolbar-button {
|
|
152
|
+
width: 36px;
|
|
153
|
+
height: 36px;
|
|
154
|
+
font-size: 12px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.search-container,
|
|
158
|
+
.measurement-menu,
|
|
159
|
+
.layers-menu {
|
|
160
|
+
min-width: 180px;
|
|
161
|
+
}
|
|
162
|
+
}
|
package/package.json
CHANGED