@vsleem-realsee-viewer/realsee-plugin 2.1.5 → 2.1.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.
@@ -1,901 +0,0 @@
1
- # 1. Realsee全景组件
2
-
3
- ## 1.1 介绍
4
-
5
- 用于将全景图展示在页面上的组件,组件包含轨迹小地图组件,播放栏组件,全景标记,全景交互等功能
6
-
7
- 依赖@vsleem-realsee-viewer/shared(共享类)
8
-
9
- ## 目录
10
-
11
- - [1. Realsee全景组件](#1-realsee全景组件)
12
- - [2. Viewer 视图组件](#2-viewer-视图组件)
13
- - [3. Marker 标记组件](#3-marker-标记组件)
14
- - [4. Map 小地图组件](#4-map-小地图组件)
15
- - [5. 核心类说明](#5-核心类说明)
16
- - [6. 枚举类型](#6-枚举类型)
17
- - [7. 数据模型类型](#7-数据模型类型)
18
- - [8. 配置常量](#8-配置常量)
19
- - [9. 工具函数](#9-工具函数)
20
- - [10. 导出的类型声明对象](#10-导出的类型声明对象)
21
- - [11. 示例](#11-示例)
22
-
23
- ## 1.2 RealseeProps 参数说明
24
-
25
- | 参数名 | 类型 | 默认值 | 说明 |
26
- | ------------------- | -------------------------------------------------------- | ------------------------------ | ------------------------------------------ |
27
- | `appSetting` | `AppSetting` | 请查看AppSetting类型默认值 | 应用全局配置 |
28
- | `searchInfo` | `SearchInfo` | - | 数据查询条件参数 |
29
- | `realseeSetting?` | `RealseeSetting` | 请查看RealseeSetting类型默认值 | 全景功能专用配置 |
30
- | `viewer?` | `ViewerProps` | 请查看ViewerProps类型默认值 | 全景相关属性配置 |
31
- | `marker?` | `MarkerProps` | 请查看MarkerProps类型默认值 | 标记点相关属性配置 |
32
- | `playbar?` | `PlaybarProps` | 请查看PlaybarProps类型默认值 | 播放器控制栏配置 |
33
- | `map?` | `MapProps` | 请查看MapProps类型默认值 | 小地图配置 |
34
- | `immediate?` | `boolean` | true | 是否立即发起数据请求 |
35
- | `fetchParams?` | `Record<string, any>` | - | 自定义请求参数(排除坐标系相关接口) |
36
- | `handleResponseFn?` | `(res: TrackRecordModel) => Promise<TrackRecordModel>` | - | 自定义响应数据处理(需返回处理后的数据) |
37
- | `fetchSuccess?` | `(record: TrackRecord, coordinate?: Coordinate) => void` | - | 请求成功回调(`coordinate`为可选坐标参数) |
38
- | `fetchError?` | `(error: any) => void` | - | 请求失败回调 |
39
-
40
- |
41
-
42
- ## 1.3 AppSetting 类型说明
43
-
44
- | 参数名 | 类型 | 默认值 | 说明 |
45
- | --------------- | --------------------------------- | ------------------------ | ------------------------------------------------------ |
46
- | `baseUrl?` | `string` | `https://vsleem.com/api` | 用于配置应用后端服务的根路径 |
47
- | `authorizeCode` | `string` | - | 用于API身份验证和授权的凭证 |
48
- | `locale?` | `string` | `LocaleType.zh_CN` | 当前语言 |
49
- | `obsPrefix?` | `string` | - | 用于在对象存储中组织文件的目录路径(不可用) |
50
- | `obsType?` | `string` | hs | 指定使用的对象存储服务提供商 huawei \| aliyun \| hs 等 |
51
- | `obsTiles?` | `{ cols: number; rows: number } ` | - | 对象存储瓦片数量(需与obsType同时使用) |
52
-
53
- ## 1.4 RealseeSetting 类型说明
54
-
55
- | 参数名 | 类型 | 默认值 | 说明 |
56
- | ------------------ | ---------- | ---------------- | ------------------------------------ |
57
- | `pointLax?` | `number` | 0 | 路径点稀疏系数 |
58
- | `pointType?` | `number` | 0 | 迹点展示模式:0=点位模式,1=距离模式 |
59
- | `pointNumber?` | `number` | 5 | 展示前后多少个点 |
60
- | `pointDistance?` | `number` | 5 | 展示轨迹点范围内的点 |
61
- | `preloadStep?` | `number` | 5 | 全景预加载数量 |
62
- | `trackColorRange?` | `string[]` | TRACK_COLOR_LIST | 轨迹颜色范围 |
63
- | `pathPin?` | `any` | pinIcon | 路径图钉 |
64
- | `pathRedPin?` | `any` | redPinIcon | 红色路径图钉(有问题标记的路径图钉) |
65
-
66
- ```
67
- const TRACK_COLOR_LIST = [
68
- '#3CDE99',
69
- '#DE3CB9',
70
- '#683CDE',
71
- '#3CA0DE',
72
- '#D8DE3C',
73
- '#DEA03C',
74
- '#DE3C3C',
75
- ]
76
- ```
77
-
78
- ## 1.5 SearchInfo 类型说明
79
-
80
- | 参数名 | 类型 | 默认值 | 说明 |
81
- | ------------ | -------------------- | ------ | ------------------------------ |
82
- | `projectId` | `number` | - | 项目唯一标识 |
83
- | `patrolId` | `string \| string[]` | - | 巡检记录id或id集合 |
84
- | `pointId?` | `string` | - | 轨迹点标识(用于定位具体点位) |
85
- | `modelCsId?` | `number` | - | 模型坐标系标识 |
86
-
87
- ## 1.6 RealseeStore 类型说明
88
-
89
- | 属性/方法 | 类型/签名 | 说明 |
90
- | ----------------------- | --------------------------------------------------------- | ------------------------------------------ |
91
- | `ready` | `boolean` | 是否加载完成 |
92
- | `coordinateTree?` | `Coordinate` | 坐标系树数据 |
93
- | `mappedCoordinateTree?` | `Coordinate` | 映射坐标系树数据 |
94
- | `rawDataSource` | `Map<string, TrackRecord>` | 原始所有巡检记录集合 |
95
- | `dataSource` | `Map<string, TrackRecord>` | 展示的所有巡检记录集合 |
96
- | `comCoordinate?` | `Coordinate` | 所有记录集合共有的空间坐标系 |
97
- | `currentModel?` | `Coordinate` | 当前选中的模型坐标系 |
98
- | `currentSpace?` | `Coordinate` | 当前模型所属的空间坐标系 |
99
- | `currentRawRecord?` | `TrackRecord` | 当前选中的原始巡检记录 |
100
- | `currentRecord?` | `TrackRecord` | 当前选中的巡检记录 |
101
- | `currentRawPoint?` | `TrackPoint` | 当前选中的原始轨迹点 |
102
- | `currentPoint?` | `TrackPoint` | 当前选中的轨迹点 |
103
- | `currentMarker?` | `TrackMarker` | 当前选中的问题标记 |
104
- | `currentPointMarkers` | `TrackMarker[]` | 当前点关联的所有问题标记列表 |
105
- | `groupedMarkers` | ` Map<TrackPoint, TrackMarker[]>` | 根据坐标点对所有巡检记录的问题标记进行分组 |
106
- | `reload` | `(searchInfo: SearchInfo) => Promise<void>` | 重新加载数据(包含 projectId 和 patrolId) |
107
- | `fetchRecord` | `(patrolId: string) => Promise<TrackRecord \| undefined>` | 获取单条巡检记录 |
108
- | `selectModel` | `(coordinate: Partial<Coordinate>) => void` | 选择模型(找不到对应模型时抛出错误) |
109
- | `selectRecord` | `(record: Partial<TrackRecord>) => void` | 选择巡检记录(找不到对应记录时抛出错误) |
110
- | `selectPoint` | `(point: Partial<TrackPoint>) => void` | 选择轨迹点(找不到对应点时抛出错误) |
111
- | `selectMarker` | `(marker: Partial<TrackMarker>) => void` | 选择问题标记(找不到对应标记时抛出错误) |
112
- | `setReferPoint` | `(current: TrackPoint, options: PanoOptions) => void` | 设置参考点来找最近的轨迹点(视图对比使用) |
113
- | `addMarker` | ` (marker: TrackMarker) => void;` | 添加问题标记 |
114
- | `removeMarker` | ` (marker: Partial<TrackMarker>) => void` | 移除问题标记 |
115
- | `updateMarker` | `(marker: Partial<TrackMarker>) => void` | 要更新的标记数据(包含patrolId和id) |
116
- | `hasRecord` | `(id: string) => boolean` | 检查指定ID的记录是否存在 |
117
- | `getRecord` | `(id: string) => TrackRecord \| undefined` | 获取指定ID的记录对象 |
118
- | `addRecord` | `(id: string) => Promise<TrackRecord \| undefined>` | 添加新记录 |
119
- | `batchAddRecords` | ` (ids: string[]) => Promise<void>` | 批量添加巡检记录 |
120
- | `removeRecord` | `(id: string) => boolean` | 移除指定记录 |
121
- | `updateRecord` | `(record: TrackRecord) => Promise<void>` | 更新记录数据 |
122
- | `findClosestBIMModel` | `() => Coordinate \| undefined` | 获取当前模型在映射坐标系树最近的bimsee模型 |
123
- | `findClosestPoint` | `(current: TrackPoint): TrackPoint \| undefined` | 查找距离给定点最近的轨迹点 |
124
- | `normalizeToModelPoint` | ` (current: TrackPoint) => TrackPoint \| undefined` | 将参考点坐标归一化到当前的模型坐标系 |
125
-
126
- ## 1.7 RealseeElement 实例对象
127
-
128
- | 属性/方法 | 类型/签名 | 说明 |
129
- | -------------- | ------------------------------------------ | -------------------------------------------------------------------- |
130
- | `storeRef` | `ComputedRef<RealseeStore>` | 存储对象引用 |
131
- | `getStore()` | `() => RealseeStore` | 获取状态管理库实例 |
132
- | `getViewer()` | `() => ViewerElement \| undefined` | 获取全景视图控制器(未配置 viewer 时返回 undefined) |
133
- | `getMarker()` | `() => MarkerElement \| undefined` | 获取标记点控制器(未配置 marker 时返回 undefined) |
134
- | `getPlaybar()` | `() => PlaybarElement \| undefined` | 获取播放控制栏实例(未配置 playbar 或配置为 false 时返回 undefined) |
135
- | `getMap()` | `() => MapElement \| undefined` | 获取小地图实例(未配置 map 或配置为 false 时返回 undefined) |
136
- | `getOptions()` | `() => RealseeProps` | 获取当前运行时配置(包含实际生效的配置) |
137
- | `getState()` | `() => RealseeProps` | 获取初始化配置(返回原始配置参数) |
138
- | `setState()` | `(options: UpdatableRealseeProps) => void` | 动态更新可修改配置(注意:部分配置初始化后不可更改 |
139
-
140
- ## 1.8 RealseeEvents 事件说明
141
-
142
- | 事件名称 | 参数类型 | 说明 |
143
- | ----------------------- | ------------------------------- | ------------------------ |
144
- | `ready` | `() => void` | 触发基本准备就绪事件 |
145
- | `reload` | `() => void` | 触发重新加载事件 |
146
- | `destroy` | `() => void` | 触发组件销毁事件 |
147
- | `changeModel` | `(model: Coordinate) => void` | 处理模型变化事件 |
148
- | `changeRecord` | `(record: TrackRecord) => void` | 处理记录变化事件 |
149
- | `changePoint` | `(point: TrackPoint) => void` | 处理点的变更事件 |
150
- | `mapReady` | `() => void` | 触发地图准备就绪事件 |
151
- | `mapResize` | `() => void` | 触发地图尺寸改变事件 |
152
- | `mapCollapse` | `(value: number) => void` | 触发小地图展开/折叠事件 |
153
- | `mapDragger` | `() => void` | 触发地图拖动事件 |
154
- | `mapSelectPoint` | `(point: TrackPoint) => void` | 选择地图上的点事件 |
155
- | `mapAngleUpdated` | `(value: number) => void` | 更新地图雷达角度事件 |
156
- | `viewerReady` | `() => void` | 触发视图准备就绪事件 |
157
- | `viewerClick` | `(e: any) => void` | 触发视图点击事件 |
158
- | `viewerMousedown` | `(e: any) => void` | 处理视图鼠标按下事件 |
159
- | `viewerSizeUpdated` | `(e: any) => void` | 更新视图容器变化事件 |
160
- | `viewerZoomUpdated` | `(e: any) => void` | 更新视图缩放信息事件 |
161
- | `viewerPositionUpdated` | `(e: any) => void` | 更新视图位置事件 |
162
- | `viewerPanoramaLoaded` | `(e: any) => void` | 视图全景图加载完成事件 |
163
- | `viewerPanoramaError` | `(e: any) => void` | 视图全景图加载失败事件 |
164
- | `viewerSelectPoint` | `(point: TrackPoint) => void` | 在视图中选择一个点事件 |
165
- | `viewerSelectMarker` | `(point: TrackPoint) => void` | 在视图中选择一个标记事件 |
166
- | `playbarReady` | `() => void` | 触发播放条准备就绪事件 |
167
- | `playbarBackward` | `(value: number) => void` | 触发播放条后退事件 |
168
- | `playbarPause` | `(value: number) => void` | 触发播放条暂停事件 |
169
- | `playbarPlay` | `(value: number) => void` | 触发播放条播放事件 |
170
- | `playbarForward` | `(value: number) => void` | 触发播放条前进事件 |
171
- | `playbarSpeed` | `(speed : number) => void` | 更新播放条速度事件 |
172
- | `playbarSlider` | `(index: number) => void` | 触发播放条滑块变化事件 |
173
- | `playbarSelectPoint` | `(step : number) => void` | 选择播放条上的点事件 |
174
-
175
- ## 1.9 Realsee Slot 插槽说明
176
-
177
- | 插槽名称 | 参数类型 | 说明 |
178
- | ---------------- | ----------------------- | ---------------- |
179
- | `default` | `(slot) => void` | 默认插槽 |
180
- | `mapDefault` | `(mapSlot) => void` | 地图默认插槽 |
181
- | `mapExtra` | `(mapSlot) => void` | 地图额外信息插槽 |
182
- | `mapLeft` | `(mapSlot) => void` | 地图左侧插槽 |
183
- | `mapRight` | `(mapSlot) => void` | 地图右侧插槽 |
184
- | `playbarDefault` | `(playbarSlot) => void` | 播放条默认插槽 |
185
- | `playbarBox` | `(playbarSlot) => void` | 播放条盒子插槽 |
186
- | `playbarButton` | `(playbarSlot) => void` | 播放条按钮插槽 |
187
- | `playbarCaption` | `(playbarSlot) => void` | 播放条标题插槽 |
188
- | `playbarSlider` | `(playbarSlot) => void` | 播放条滑块插槽 |
189
-
190
- ```js
191
- type slot= {
192
- dataSource: Map<string, TrackRecord> | undefined;
193
- coordinateTree: Coordinate | undefined;
194
- mappedCoordinateTree: Coordinate | undefined;
195
- currentSpace: Coordinate | undefined;
196
- currentModel: Coordinate | undefined;
197
- currentRecord: TrackRecord | undefined;
198
- currentPoint: TrackPoint | undefined;
199
- currentPointMarkers: TrackMarker[] | undefined;
200
- currentMarker: TrackMarker | undefined;
201
- }
202
- ```
203
-
204
- ### RealseeStore 方法说明
205
-
206
- | 方法 | 类型签名 | 说明 |
207
- | --------------------- | --------------------------------------------------------- | -------------------- |
208
- | `reload` | `(searchInfo: SearchInfo) => Promise<void>` | 重新加载数据 |
209
- | `fetchRecord` | `(patrolId: string) => Promise<TrackRecord \| undefined>` | 获取单条巡检记录 |
210
- | `selectModel` | `(coordinate: Partial<Coordinate>) => void` | 选择模型坐标系 |
211
- | `selectRecord` | `(record: Partial<TrackRecord>) => void` | 选择巡检记录 |
212
- | `selectPoint` | `(point: Partial<TrackPoint>) => void` | 选择轨迹点 |
213
- | `selectMarker` | `(marker?: Partial<TrackMarker>) => void` | 选择问题标记 |
214
- | `setReferPoint` | `(current: TrackPoint, options: PanoOptions) => void` | 设置参考点 |
215
- | `addMarker` | `(marker: TrackMarker) => void` | 添加问题标记 |
216
- | `removeMarker` | `(marker: Partial<TrackMarker>) => void` | 移除问题标记 |
217
- | `updateMarker` | `(marker: Partial<TrackMarker>) => void` | 更新问题标记 |
218
- | `hasRecord` | `(id: string) => boolean` | 检查是否存在指定记录 |
219
- | `getRecord` | `(id: string) => TrackRecord \| undefined` | 获取指定记录 |
220
- | `addRecord` | `(id: string) => Promise<TrackRecord \| undefined>` | 添加新记录 |
221
- | `batchAddRecords` | `(ids: string[]) => Promise<void>` | 批量添加巡检记录 |
222
- | `removeRecord` | `(id: string) => boolean` | 移除记录 |
223
- | `updateRecord` | `(record: TrackRecord) => Promise<void>` | 更新记录数据 |
224
- | `findClosestBIMModel` | `() => Coordinate \| undefined` | 查找最近的BIM模型 |
225
-
226
- type mapSlot = slot & {
227
- state: Required<Partial<MapProps>>;
228
- }
229
-
230
- type playbarSlot = slot & {
231
- state: Required<Partial<PlaybarProps>>;
232
- }
233
-
234
- ```
235
-
236
- # 2. Viewer 视图组件
237
-
238
- ## 2.1 介绍
239
-
240
- 一个用于展示360°全景图的组件
241
-
242
- ## 2.2 ViewerProps 类型说明
243
-
244
- - `ViewerProps 类型继承 core.viewerconfig,更多属性请参考https://photo-sphere-viewer.js.org/api/types/core.viewerconfig`
245
-
246
- | 属性 | 类型 | 默认值 | 说明 |
247
- | ----------------- | ----------------- | --------------------------- | -------------- |
248
- | `...ViewerConfig` | `...ViewerConfig` | 请查看VIEWER_CONFIG默认配置 | 视图配置 |
249
- | `viewMode` | `number` | ViewModeEnum.Auto | 视图预览模式 |
250
- | `loadingPh` | `boolean` | false | 是否加载占位图 |
251
-
252
- ```
253
-
254
- type ReadonlyViewerConfig = 'container' | 'panorama' | 'keyboard' | 'keyboardActions';
255
- type ViewerProps = Omit<ViewerConfig, ReadonlyViewerConfig>;
256
-
257
- ```
258
-
259
- ## 2.3 ViewerElement 实例对象
260
-
261
- | 属性/方法 | 类型签名 | 说明 |
262
- | -------------------- | ------------------------------------------------------------------------- | -------------------- |
263
- | `getState` | `()=> UpdatableViewerProps \| undefined` | 获取当前视图配置选项 |
264
- | `setState` | `(options?: UpdatableViewerProps) => void` | 更新视图配置选项 |
265
- | `isMouseover` | `()=> boolean` | 获取鼠标悬停状态 |
266
- | `isMousedown` | `()=> boolean` | 获取鼠标按下状态 |
267
- | `setMousedown` | `(mousedown: boolean) => void` | 设置鼠标按下状态 |
268
- | `setMouseover` | `(mouseover: boolean) => void` | 设置鼠标悬停状态 |
269
- | `setPanoramaPath` | `(path: any, options?: PanoramaOptions) => Promise<boolean \| undefined>` | 加载全景图 |
270
- | `setViewerStatus` | `(options?: PanoOptions) => void` | 设置全景图专用选项 |
271
- | `setMoveDirection` | `(value?: number) => void` | 设置球面视角方向选项 |
272
- | `updateMarkers` | `() => void` | 更新在全景图上的标记 |
273
- | `updateViewer` | `() => void` | 刷新视图 |
274
- | `preloadPanorama` | `() => void` | 预加载全景图资源 |
275
- | `loadMarkers` | `() => void` | 加载全景图上的标记 |
276
- | `getPanoramaOptions` | `(currentPoint?: TrackPoint) => PanoramaOptions` | 获取全景图选项 |
277
- | `getTransitionSpeed` | `(speed: number) => number` | 获取视图转换速度 |
278
- | `getMovePosition` | `(currentPoint?: TrackPoint) => Position \| undefined` | 获取视图转换位置 |
279
-
280
- ## 2.4 ViewerEvents 事件说明
281
-
282
- - `Viewer 实例对象事件监听说明请参考https://photo-sphere-viewer.js.org/api/modules/core.events`
283
- - `Marker 实例对象事件监听说明请参考https://photo-sphere-viewer.js.org/api/modules/markersplugin.events`
284
- `以下是自定义事件说明`
285
-
286
- | 事件名称 | 参数类型 | 说明 |
287
- | ----------------- | ----------------------------- | ------------------------------ |
288
- | `register` | `--` | 注册视图事件 |
289
- | `ready` | `() => void` | 触发视图准备就绪事件 |
290
- | `click` | `(e: any) => void` | 处理视图点击事件 |
291
- | `mousedown` | `(e: any) => void` | 处理视图鼠标按下事件并折叠地图 |
292
- | `sizeUpdated` | `(e: any) => void` | 更新视图容器变化 |
293
- | `zoomUpdated` | `(e: any) => void` | 更新视图缩放信息 |
294
- | `positionUpdated` | `(e: any) => void` | 更新视图位置 |
295
- | `panoramaLoaded` | `(e: any) => void` | 视图位全景图加载完成 |
296
- | `panoramaError` | `(e: any) => void` | 视图位全景图加载失败 |
297
- | `selectPoint` | `(point: TrackPoint) => void` | 在视图中选择一个点相关事件 |
298
- | `selectMarker` | `(point: TrackPoint) => void` | 在视图中选择一个标记事件 |
299
-
300
- ## 2.5 MarkerProps 类型说明
301
-
302
- - `MarkerProps 类型继承 markersplugin.markerspluginconfig,更多属性请参考https://photo-sphere-viewer.js.org/api/types/markersplugin.markerspluginconfig以下是自定义参数说明`
303
-
304
- - `MarkerOptions 类型继承 markersplugin.markerconfig,请参考https://photo-sphere-viewer.js.org/api/types/markersplugin.markerconfig`
305
-
306
- | 属性 | 类型 | 默认值 | 描述 |
307
- | -------------------------- | ----------------------------------------------- | --------------------------------- | ------------------------------------------------------------------------- |
308
- | `...MarkersPluginConfig` | `...MarkersPluginConfig` | 请查看MarkersPluginConfig默认配置 | 标记配置 |
309
- | `onPointChange?` | `(e: events.SelectMarkerEvent) => Promise<any>` | - | 全景上点击轨迹点回调,参数为关闭函数,返回 promise 时 rejected 后停止执行 |
310
- | `onMarkerChange?` | `(e: events.SelectMarkerEvent) => Promise<any>` | - | 全景上点击标记点回调,参数为关闭函数,返回 promise 时 rejected 后停止执行 |
311
- | `handleViolationMarkerFn?` | `(marker: MarkerOptions) => MarkerOptions` | - | 处理轨迹点上的标记 |
312
- | `handlePathMarkerFn?` | `(marker: MarkerOptions) => MarkerOptions` | - | 处理路径标记 |
313
-
314
- ```
315
-
316
- type MarkerProps = MarkersPluginConfig & {
317
- onPointChange?: (e: events.SelectMarkerEvent) => Promise<any>;
318
- onMarkerChange?: (e: events.SelectMarkerEvent) => Promise<any>;
319
- handleViolationMarkerFn?: (marker: MarkerOptions) => MarkerOptions;
320
- handlePathMarkerFn?: (marker: MarkerOptions) => MarkerOptions;
321
- };
322
-
323
- ```
324
-
325
- ## 2.6 MarkerElement 实例对象
326
-
327
- -`MarkerElement 继承 Marker 对象,更多方法请参考https://photo-sphere-viewer.js.org/api/classes/markersplugin.markersplugin`
328
-
329
- | 属性/方法 | 类型/签名 | 默认值 | 说明 |
330
- | ------------------ | ------------------ | -------------------- | -------- |
331
- | `...MarkersPlugin` | `...MarkersPlugin` | 请查看Marker默认配置 | 视图配置 |
332
-
333
- ```
334
-
335
- type MarkerElement = MarkersPlugin
336
-
337
- ````
338
-
339
- # 3. Playbar 播放器组件
340
-
341
- ## 3.1 介绍
342
-
343
- 一个用于播放全景图的组件
344
-
345
- ## 3.2 PlaybarProps 类型说明
346
-
347
- | 属性 | 类型 | 默认值 | 说明 |
348
- | ----------------- | ----------------- | ---------------------------- | -------------------------------- |
349
- | `style?` | `CSSProperties` | - | 播放栏浮层的样式,调整浮层位置等 |
350
- | `showPlay?` | `boolean` | true | 是否显示播放/暂停按钮 |
351
- | `showSpeed?` | `boolean` | true | 是否显示快进按钮 |
352
- | `speed?` | `number` | 1000 | 当前播放速度 单位毫秒 |
353
- | `baseSpeed?` | `number` | 1000 | 基准速度 单位毫秒 |
354
- | `step?` | `number` | 0.5 | 播放倍数步长 |
355
- | `threshold?` | `number` | 2000 | 播放速度阈值 单位毫秒 |
356
- | `rotation?` | `PlaybarRotation` | 请查看PLAYBAR_CONFIG默认配置 | 旋转到路径/视角方向选项 |
357
- | `readonly count?` | `number` | - | 轨迹点总数 |
358
- | `readonly index?` | `number` | - | 当前第几个轨迹点 |
359
-
360
- ## 3.3 PlaybarElement 属性/方法说明
361
-
362
- | 属性/方法 | 类型/签名 | 说明 |
363
- | ---------- | --------------------------------------------------- | ------------ |
364
- | `getState` | `() => UpdatablePlaybarProps` | 获取配置选项 |
365
- | `setState` | `(options: Partial<UpdatablePlaybarProps>) => void` | 设置配置选项 |
366
- | `backward` | `() => void` | 后退 |
367
- | `play` | `() => void` | 播放 |
368
- | `pause` | `() => void` | 暂停 |
369
- | `forward` | `() => void` | 前进 |
370
- | `slider` | `() => void` | 滑动 |
371
- | `speed` | `() => void` | 快进 |
372
- | `playNext` | `() => void` | 播放下一个 |
373
-
374
- ## 3.4 PlaybarEvents 事件说明
375
-
376
- | 事件名称 | 参数类型 | 说明 |
377
- | ------------- | -------------------------- | -------------- |
378
- | `register` | `--` | 注册播放器事件 |
379
- | `ready` | `() => void` | 准备就绪 |
380
- | `backward` | `(index: number) => void` | 后退操作 |
381
- | `pause` | `(index: number) => void` | 暂停操作 |
382
- | `play` | `(index: number) => void` | 播放操作 |
383
- | `forward` | `(index: number) => void` | 前进操作 |
384
- | `speed` | `(speed?: number) => void` | 快进操作 |
385
- | `slider` | `(index: number) => void` | 滑动条变动 |
386
- | `selectPoint` | `(index: number) => void` | 改变轨迹点 |
387
-
388
- ## 3.5 Playbar Slot 插槽说明
389
-
390
- | 插槽名称 | 参数类型 | 说明 |
391
- | --------- | ---------------- | -------------- |
392
- | `default` | `(slot) => void` | 播放条默认插槽 |
393
- | `box` | `(slot) => void` | 播放条盒子插槽 |
394
- | `button` | `(slot) => void` | 播放条按钮插槽 |
395
- | `caption` | `(slot) => void` | 播放条标题插槽 |
396
- | `slider` | `(slot) => void` | 播放条滑块插槽 |
397
-
398
- ```js
399
- type slot= {
400
- dataSource: Map<string, TrackRecord> | undefined;
401
- coordinateTree: Coordinate | undefined;
402
- mappedCoordinateTree: Coordinate | undefined;
403
- currentSpace: Coordinate | undefined;
404
- currentModel: Coordinate | undefined;
405
- currentRecord: TrackRecord | undefined;
406
- currentPoint: TrackPoint | undefined;
407
- currentPointMarkers: TrackMarker[] | undefined;
408
- currentMarker: TrackMarker | undefined;
409
- state: Required<Partial<PlaybarProps>>;
410
- }
411
- ````
412
-
413
- # 4. Map 小地图组件
414
-
415
- ## 4.1 介绍
416
-
417
- 一个用于展示巡检轨迹点的组件
418
-
419
- ## 4.2 MapProps 类型说明
420
-
421
- | 属性 | 类型 | 默认值 | 说明 |
422
- | ---------------------- | ------------------------------------------------------------- | ------------------------- | --------------------------------------------------------------------------- |
423
- | `style?` | `CSSProperties` | - | 地图样式 |
424
- | `showRadar?` | `boolean` | true | 是否显示雷达 |
425
- | `showPoint?` | `boolean` | true | 是否显示选中的点 |
426
- | `showMarker?` | `boolean` | true | 是否显示标记 |
427
- | `showDragger?` | `boolean` | true | 是否显示拖动按钮 |
428
- | `minSize?` | `number` | 200 | 最小尺寸 |
429
- | `maxSize?` | `number` | 500 | 最大尺寸 |
430
- | `size?` | `number` | 200 | 小地图尺寸 |
431
- | `radarYaw?` | `number` | 0 | 雷达偏航角 |
432
- | `radarHFov?` | `number` | 0 | 雷达水平视野角 |
433
- | `rotation?` | `boolean` | true | 选中帧后是否旋转到路径/视角方向 |
434
- | `tileLayers?` | `TileLayer[]` | 请查看TILE_LAYERS默认配置 | 地理地图瓦片图层列表 |
435
- | `readonly radarAngle?` | `number` | 0 | 雷达角度(只读) |
436
- | `onPointChange?` | `(point: TrackPoint,markers?: TrackMarker[]) => Promise<any>` | - | 小地图上点击轨迹点回调,参数为关闭函数,返回 promise 时 rejected 后停止执行 |
437
-
438
- ## 4.3 MapElement 属性/方法说明
439
-
440
- | 属性/方法 | 类型/签名 | 说明 |
441
- | -------------- | ----------------------------------------------- | ------------------ |
442
- | `getState` | `() => UpdatableMapProps` | 获取配置选项 |
443
- | `setState` | `(options: Partial<UpdatableMapProps>) => void` | 设置配置选项 |
444
- | `setSize` | `(size: number) => void` | 设置小地图容器大小 |
445
- | `setCollapse` | `(value: boolean) => void` | 展开/折叠小地图 |
446
- | `setRadarYaw` | `(yaw: number) => void` | 设置雷达偏航角 |
447
- | `setRadarHFov` | `(hFov: number) => void` | 设置雷达水平视野角 |
448
- | `needUpdate` | `() => void` | 需要更新状态 |
449
-
450
- ## 4.4 MapEvents 事件说明
451
-
452
- | 事件名称 | 参数类型 | 说明 |
453
- | -------------- | -------------------------- | ----------------- |
454
- | `register` | `--` | 注册小地图事件 |
455
- | `ready` | `() => void` | 触发准备事件 |
456
- | `collapse` | `(value: boolean) => void` | 触发折叠/展开事件 |
457
- | `dragger` | `(value: number) => void` | 拖动事件 |
458
- | `selectPoint` | `(index: number) => void` | 改变轨迹点 |
459
- | `angleUpdated` | `(value: number) => void` | 触发雷达角度事件 |
460
-
461
- ## 4.5 Map Slot 插槽说明
462
-
463
- | 插槽名称 | 参数类型 | 说明 |
464
- | --------- | ---------------- | ---------------- |
465
- | `default` | `(slot) => void` | 地图默认插槽 |
466
- | `extra` | `(slot) => void` | 地图额外信息插槽 |
467
- | `left` | `(slot) => void` | 地图左侧插槽 |
468
- | `right` | `(slot) => void` | 地图右侧插槽 |
469
-
470
- ```js
471
- type slot= {
472
- dataSource: Map<string, TrackRecord> | undefined;
473
- coordinateTree: Coordinate | undefined;
474
- mappedCoordinateTree: Coordinate | undefined;
475
- currentSpace: Coordinate | undefined;
476
- currentModel: Coordinate | undefined;
477
- currentRecord: TrackRecord | undefined;
478
- currentPoint: TrackPoint | undefined;
479
- currentPointMarkers: TrackMarker[] | undefined;
480
- currentMarker: TrackMarker | undefined;
481
- state: Required<Partial<MapProps>>;
482
- }
483
- ```
484
-
485
- # 5. 核心类说明
486
-
487
- ## 5.1 TrackPoint 轨迹点类
488
-
489
- 用于表示巡检轨迹中的单个点位。
490
-
491
- ### 属性说明
492
-
493
- | 属性 | 类型 | 说明 |
494
- | ---------------- | ------------ | ---------------------- |
495
- | `id` | `string` | 点ID |
496
- | `img` | `string` | 全景图地址 |
497
- | `patrolId` | `string` | 巡检记录ID |
498
- | `coordinate` | `Coordinate` | 源坐标系 |
499
- | `point` | `Point` | 在源坐标系上的坐标点 |
500
- | `position` | `Point` | 在空间坐标系上的坐标点 |
501
- | `placeholderImg` | `string` | 占位全景图 |
502
- | `uxTime` | `string` | 创建时间 |
503
- | `panorama` | `any` | 全景图地址(组件使用) |
504
- | `color` | `string` | 轨迹颜色 |
505
- | `index` | `number` | 点的下标 |
506
- | `rawIndex` | `number` | 点的原始下标 |
507
-
508
- ### 方法说明
509
-
510
- | 方法 | 类型 | 说明 |
511
- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
512
- | `constructor` | `(options?: Partial<TrackPoint>) => TrackPoint` | 构造函数 |
513
- | `parsedModel` | `(point: Partial<TrackPointModel>, coordinate: Coordinate, panoramaSize?: PanoramaSize, appSetting?: AppSetting) => Partial<TrackPoint>` | 解析轨迹点字段 |
514
- | `toSphericalCoord` | `(p1: Point, p2: Point) => { d: number, yaw: number, pitch: number }` | 计算球面坐标位置 |
515
- | `projection` | `(r1: TrackCoordinateRelation, r2: TrackCoordinateRelation) => Point \| undefined` | 坐标投影转换 |
516
-
517
- ## 5.2 TrackMarker 问题标记类
518
-
519
- 用于表示全景图中的问题标记点。
520
-
521
- ### 属性说明
522
-
523
- | 属性 | 类型 | 说明 |
524
- | ------------------ | ------------ | -------------------- |
525
- | `id` | `string` | 问题标记ID |
526
- | `pointId` | `string` | 轨迹点ID |
527
- | `patrolId` | `string` | 巡检记录ID |
528
- | `coordinateId` | `number` | 原始源坐标系ID |
529
- | `coordinate` | `Coordinate` | 源坐标系 |
530
- | `point` | `Point` | 在源坐标系上的坐标点 |
531
- | `relativePosition` | `string` | 原始坐标映射关系 |
532
- | `perspective` | `Position` | 在球面的位置 |
533
- | `photoTime` | `string` | 拍照时间 |
534
- | `panorama` | `string` | 全景图 |
535
- | `markerIcon` | `any` | 标记图标 |
536
- | `markerType` | `string` | 标记类型 |
537
- | `data` | `any` | 自定义数据 |
538
-
539
- ### 方法说明
540
-
541
- | 方法 | 类型 | 说明 |
542
- | ------------- | ------------------------------------------------------------------------------------------ | ---------------- |
543
- | `constructor` | `(options?: Partial<TrackMarker>) => TrackMarker` | 构造函数 |
544
- | `parsedModel` | `(marker: Partial<TrackMarkerModel>, coordinateTree?: Coordinate) => Partial<TrackMarker>` | 解析问题标记字段 |
545
- | `projection` | `(dstCoordinate: Coordinate) => TrackMarker \| undefined` | 坐标投影转换 |
546
-
547
- ## 5.3 TrackRecord 巡检记录类
548
-
549
- 用于表示一条完整的巡检记录。
550
-
551
- ### 属性说明
552
-
553
- | 属性 | 类型 | 说明 |
554
- | ------------------ | -------------------------- | ---------------- |
555
- | `id` | `string` | 记录唯一标识 |
556
- | `coordinateId` | `number` | 原始源坐标系ID |
557
- | `coordinate` | `Coordinate` | 轨迹点坐标系 |
558
- | `trackPoints` | `Map<string, TrackPoint>` | 轨迹点集合 |
559
- | `trackMarkers` | `Map<string, TrackMarker>` | 标记点集合 |
560
- | `relativePosition` | `string` | 原始坐标映射关系 |
561
- | `projectId` | `number` | 关联的项目ID |
562
- | `createTime` | `number` | 创建时间戳 |
563
- | `color` | `string` | 显示颜色 |
564
- | `type` | `number` | 记录类型 |
565
- | `panoramaSize` | `PanoramaSize` | 全景图尺寸信息 |
566
- | `realseeSetting` | `RealseeSetting` | 全景设置 |
567
- | `data` | `any` | 第三方附加数据 |
568
-
569
- ### 方法说明
570
-
571
- | 方法 | 类型 | 说明 |
572
- | ------------- | ------------------------------------------------------------------------------------------------------------------- | ---------------- |
573
- | `constructor` | `(options?: Partial<TrackRecord>) => TrackRecord` | 构造函数 |
574
- | `parsedModel` | `(record: TrackRecordModel, coordinateTree?: Coordinate, appSetting?: AppSetting) => Promise<Partial<TrackRecord>>` | 解析原始记录数据 |
575
-
576
- ---
577
-
578
- # 6. 枚举类型
579
-
580
- ## 6.1 TrackRecordTypeEnum 巡检记录类型
581
-
582
- | 值 | 说明 |
583
- | --------------- | -------------- |
584
- | `Manual` | 手动巡检 (0) |
585
- | `Intelligent` | 智能巡检 (1) |
586
- | `RTK` | RTK (2) |
587
- | `RealTimeTrack` | 实时轨迹 (3) |
588
- | `Drone` | 无人机巡检 (4) |
589
-
590
- ## 6.2 PointTypeEnum 路径点展示模式
591
-
592
- | 值 | 说明 |
593
- | ---------- | -------- |
594
- | `NUMBER` | 点位模式 |
595
- | `DISTANCE` | 距离模式 |
596
-
597
- ## 6.3 MarkerTypeEnum 标记类型
598
-
599
- | 值 | 说明 |
600
- | ----- | -------- |
601
- | `pin` | 方向标记 |
602
-
603
- ## 6.4 DirectionMoveEnum 移动方向
604
-
605
- | 值 | 说明 |
606
- | ------------ | --------- |
607
- | `Forward` | 前进 (1) |
608
- | `Stationary` | 静止 (0) |
609
- | `Backward` | 后退 (-1) |
610
-
611
- ## 6.5 ViewModeEnum 视图预览模式
612
-
613
- | 值 | 说明 |
614
- | ------------ | ---------------------------------------------------------- |
615
- | `Auto` | 自由播放视角(不做任何限定) |
616
- | `FollowRoad` | 播放视角跟随轨迹自动调整 |
617
- | `FollowView` | 播放视角跟随每帧的主视角(再现巡检过程中巡检人员的主视角) |
618
-
619
- ---
620
-
621
- # 7. 数据模型类型
622
-
623
- ## 7.1 TrackPointModel 轨迹点模型
624
-
625
- | 属性 | 类型 | 说明 |
626
- | ------------ | -------- | ------------------------------- |
627
- | `id` | `string` | 唯一标识ID |
628
- | `img` | `string` | 全景图地址 |
629
- | `patroIndex` | `string` | 算法点下标 |
630
- | `patrolId` | `string` | 巡检记录ID |
631
- | `uxTime` | `string` | 格式化时间(YYYY-MM-DD HH:mm:ss) |
632
- | `color` | `string` | 颜色 |
633
- | `p` | `string` | 点位偏移量 |
634
- | `alt` | `string` | 海拔 |
635
- | `lat` | `string` | 纬度 |
636
- | `lon` | `string` | 经度 |
637
- | `x` | `string` | 在源坐标系的X坐标 |
638
- | `y` | `string` | 在源坐标系的Y坐标 |
639
- | `z` | `string` | 在源坐标系的Z坐标 |
640
- | `data` | `any` | 自定义数据 |
641
-
642
- ## 7.2 TrackMarkerModel 问题标记模型
643
-
644
- | 属性 | 类型 | 说明 |
645
- | ------------------ | -------- | ------------------ |
646
- | `id` | `string` | 问题ID |
647
- | `pointId` | `string` | 轨迹点ID |
648
- | `coordinateId` | `number` | 源坐标系ID |
649
- | `patrolId` | `string` | 巡检记录ID |
650
- | `point` | `string` | 在源坐标系的坐标点 |
651
- | `relativePosition` | `string` | 坐标映射关系 |
652
- | `perspective` | `string` | 在球面的位置 |
653
- | `photoTime` | `string` | 拍照时间 |
654
- | `panorama` | `string` | 全景图 |
655
- | `markerIcon` | `any` | 标记图标 |
656
- | `markerType` | `string` | 标记类型 |
657
- | `data` | `any` | 自定义数据 |
658
-
659
- ## 7.3 TrackRecordModel 巡检记录模型
660
-
661
- | 属性 | 类型 | 说明 |
662
- | ------------------ | -------------------- | ---------------- |
663
- | `id` | `string` | 巡检ID |
664
- | `coordinateId` | `number` | 源坐标系ID |
665
- | `relativePosition` | `string` | 坐标映射关系 |
666
- | `trackList` | `TrackPointModel[]` | 源坐标系轨迹列表 |
667
- | `markerList` | `TrackMarkerModel[]` | 问题标记列表 |
668
- | `projectId` | `number` | 项目ID |
669
- | `createTime` | `number` | 创建日期 |
670
- | `type` | `number` | 巡检记录类型 |
671
- | `color` | `string` | 颜色 |
672
- | `realseeSetting` | `string` | 全景设置 |
673
- | `data` | `any` | 自定义数据 |
674
-
675
- ## 7.4 TrackCoordinateRelation 坐标系关系
676
-
677
- | 属性 | 类型 | 说明 |
678
- | --------------------- | ------------- | ------------ |
679
- | `srcToDstRelativeMap` | `RelativeMap` | 源到目标映射 |
680
- | `srcCoordinate` | `Coordinate` | 源坐标系 |
681
- | `dstCoordinate` | `Coordinate` | 目标坐标系 |
682
-
683
- ---
684
-
685
- # 8. 配置常量
686
-
687
- ## 8.1 APP_SETTING 全局默认配置
688
-
689
- ```typescript
690
- {
691
- baseUrl: 'https://vsleem.com/api',
692
- authorizeCode: '',
693
- obsType: 'hs'
694
- }
695
- ```
696
-
697
- ## 8.2 REALSEE_SETTING 全景默认设置
698
-
699
- ```typescript
700
- {
701
- pointLax: 0, // 轨迹点稀疏距离(毫米单位)
702
- pointType: 0, // 路径点展示模式 0=点位模式,1=距离模式
703
- pointNumber: 5, // 路径展示前后多少个点
704
- pointDistance: 5000, // 路径展示距离范围内的点(毫米单位)
705
- preloadStep: 5, // 预加载步长
706
- trackColorRange: [ // 轨迹颜色范围
707
- '#3CDE99', '#DE3CB9', '#683CDE', '#3CA0DE',
708
- '#D8DE3C', '#DEA03C', '#DE3C3C'
709
- ],
710
- pathPin: pinIcon, // 路径图钉图标
711
- pathRedPin: redPinIcon // 红色路径图钉图标
712
- }
713
- ```
714
-
715
- ## 8.3 VIEWER_CONFIG 视图默认配置
716
-
717
- ```typescript
718
- {
719
- viewMode: 1, // 视图预览模式
720
- navbar: false, // 是否显示导航栏
721
- defaultYaw: 0, // 默认偏航角
722
- defaultPitch: 0, // 默认俯仰角
723
- defaultZoomLvl: 30, // 默认缩放级别
724
- defaultTransition: { speed: 900, rotation: true },
725
- moveInertia: false, // 是否启用移动惯性
726
- moveThresh: 0, // 移动旋转阈值
727
- minFov: 20, // 最小视野角度
728
- maxFov: 120, // 最大视野角度
729
- loadingImg: '', // 加载图片
730
- loadingTxt: 'Loading...',
731
- size: { width: '100%', height: '100%' }
732
- }
733
- ```
734
-
735
- ## 8.4 MAP_CONFIG 小地图默认配置
736
-
737
- 包含小地图的样式、尺寸、位置等默认配置。
738
-
739
- ## 8.5 MAP_GEO_OPTIONS 地理地图选项
740
-
741
- ```typescript
742
- {
743
- center: [31.3016935, 120.5810725], // 地图初始化经纬度
744
- zoom: 17, // 地图初始化缩放等级
745
- attributionControl: true, // 是否显示版权控件
746
- zoomControl: false // 是否显示缩放控件
747
- }
748
- ```
749
-
750
- ## 8.6 TILE_LAYERS 地图瓦片图层配置
751
-
752
- 默认天地图瓦片图层配置,包含矢量底图和标注图层。
753
-
754
- ## 8.7 TRACK_COLOR_LIST 轨迹颜色列表
755
-
756
- 预定义的7种轨迹颜色。
757
-
758
- ---
759
-
760
- # 9. 工具函数
761
-
762
- ## 9.1 panoramaCrop 全景图切片
763
-
764
- 用于对全景图进行切片处理,支持华为云、阿里云、火山引擎等对象存储服务。
765
-
766
- | 参数 | 类型 | 说明 |
767
- | -------------- | -------------- | ------------ |
768
- | `url` | `string` | 全景图片地址 |
769
- | `panoramaSize` | `PanoramaSize` | 全景图的尺寸 |
770
- | `appSetting` | `AppSetting` | App配置 |
771
-
772
- **返回值**: `{ width: number, cols: number, rows: number, baseUrl: string, tileUrl: (col: number, row: number) => string }`
773
-
774
- ## 9.2 RadarMarker 雷达标记
775
-
776
- 用于在地图上显示雷达扫描效果的标记类。
777
-
778
- | 属性 | 类型 | 默认值 | 说明 |
779
- | ----------- | ---------- | ---------------------- | ------------------------- |
780
- | `latLng` | `L.LatLng` | - | 经纬度 |
781
- | `radius` | `number` | 30 | 半径(米) |
782
- | `color` | `string` | '#108ee9' | CSS颜色值 |
783
- | `hFov` | `number` | 90 | 扇形水平视野角(0-360度) |
784
- | `angle` | `number` | 0 | 方向角度(0-360度) |
785
- | `className` | `string` | 'leaflet-radar-marker' | 自定义CSS类名 |
786
-
787
- ## 9.3 useResizeObserver 尺寸观察
788
-
789
- 用于监听元素尺寸变化的 Vue 组合式函数。
790
-
791
- | 参数 | 类型 | 说明 |
792
- | ---------- | -------------------------------------------- | -------- |
793
- | `target` | `MaybeRef<HTMLElement \| null \| undefined>` | 目标元素 |
794
- | `callback` | `(entries: ResizeObserverEntry[]) => void` | 回调函数 |
795
- | `options` | `UseResizeObserverOptions` | 选项 |
796
-
797
- **返回值**: `{ width: Ref<number>, height: Ref<number>, stop: () => void }`
798
-
799
- ---
800
-
801
- # 10. 导出的类型声明对象
802
-
803
- ```js
804
- import '@photo-sphere-viewer/core/index.css';
805
- import '@photo-sphere-viewer/markers-plugin/index.css';
806
- import 'leaflet/dist/leaflet.css';
807
- /** 组件导出 */
808
- export { Map, Playbar, Realsee as RealseePlugin, Viewer } from '@vsleem-realsee-viewer/realsee-plugin';
809
- export { default as Realsee } from '@vsleem-realsee-viewer/realsee-plugin';
810
-
811
- /** 核心类导出 */
812
- export { TrackMarker, TrackPoint, TrackRecord } from '@vsleem-realsee-viewer/realsee-plugin';
813
-
814
- /** 钩子函数导出 */
815
- export { useRealsee } from '@vsleem-realsee-viewer/realsee-plugin';
816
-
817
- /** 数据模型类型导出 */
818
- export type {
819
- TrackMarkerModel /** 轨迹标记模型 */,
820
- TrackPointModel /** 轨迹点模型 */,
821
- TrackRecordModel /** 轨迹记录模型 */,
822
- TrackCoordinateRelation /** 坐标系关系 */,
823
- } from '@vsleem-realsee-viewer/realsee-plugin';
824
-
825
- /** 配置相关类型导出 */
826
- export type {
827
- AppSetting /** 应用设置 */,
828
- MarkerOptions /** 标记选项 */,
829
- PanoOptions /** 部分全景图选项*/,
830
- PanoramaOptions /** 全景图选项 */,
831
- PanoramaSize /** 全景图尺寸 */,
832
- PlaybarRotation /**播放栏旋转选项 */,
833
- RealseeSetting /** Realsee 配置 */,
834
- SearchInfo /** 搜索信息 */,
835
- TileLayer /**瓦片图层 */,
836
- TileLayerOptions /**瓦片图层选项 */,
837
- } from '@vsleem-realsee-viewer/realsee-plugin';
838
-
839
- /** 组件属性类型导出 */
840
- export type {
841
- MapElement /** 地图元素类型 */,
842
- MapProps /** 地图属性 */,
843
- MarkerElement /** 标记元素类型 */,
844
- MarkerProps /** 标记属性 */,
845
- PlaybarElement /** 播放控制条元素类型 */,
846
- PlaybarProps /** 播放控制条属性 */,
847
- RealseeElement /** Realsee 元素类型 */,
848
- /** Realsee 相关 */
849
- RealseeProps /** Realsee 组件属性 */,
850
- RealseeStore /** Realsee 状态管理元素类型 */,
851
- /** 地图相关 */
852
- UpdatableMapProps /** 可更新的地图属性 */,
853
- /** 标记相关 */
854
- UpdatableMarkerProps /** 可更新的标记属性 */,
855
- /** 播放控制条相关 */
856
- UpdatablePlaybarProps /** 可更新的播放控制条属性 */,
857
- /** 视图相关 */
858
- UpdatableViewerProps /** 可更新的视图属性 */,
859
- ViewerElement /** 视图元素类型 */,
860
- ViewerProps /** 视图属性 */,
861
- } from '@vsleem-realsee-viewer/realsee-plugin';
862
-
863
- /** 配置常量导出 */
864
- export {
865
- APP_SETTING /** 全局默认配置 */,
866
- MAP_CONFIG /** 地图默认配置 */,
867
- MAP_GEO_OPTIONS /**地理地图选项 */,
868
- MARKER_CONFIG /** 标记默认配置 */,
869
- PLAYBAR_CONFIG /** 播放控制条默认配置 */,
870
- REALSEE_CONFIG /** Realsee 全局配置 */,
871
- REALSEE_SETTING /** Realsee 默认设置 */,
872
- TILE_LAYERS /**地图瓦片图层配置 */,
873
- TRACK_COLOR_LIST /** 轨迹的颜色 */,
874
- VIEWER_CONFIG /** 视图默认配置 */,
875
- } from '@vsleem-realsee-viewer/realsee-plugin';
876
-
877
- /**枚举类型导出 */
878
- export {
879
- ViewModeEnum /**方向模式 */,
880
- DirectionMoveEnum /**方向旋转 */,
881
- RealseeErrorCode /**全景业务错误码枚举(扩展无返回值错误) */,
882
- TrackRecordTypeEnum /**巡检记录类型枚举 */,
883
- } from '@vsleem-realsee-viewer/realsee-plugin';
884
-
885
- ```
886
-
887
- # 11. 示例
888
-
889
- 通过以下方式来注册组件
890
-
891
- ## 11.1 安装
892
-
893
- `npm install @vsleem-realsee-viewer/realsee-plugin @vsleem-realsee-viewer/shared`
894
-
895
- `pnpm add @vsleem-realsee-viewer/realsee-plugin @vsleem-realsee-viewer/shared`
896
-
897
- ## 11.2 例子
898
-
899
- `vsleem-realsee-demo仓库下的views/realsee`
900
-
901
- 仓库地址:https://gitee.com/yangleistudio/vsleem-realsee-demo