@zhangdali1996/lr-map-viewer 0.0.3 → 0.0.5
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 +102 -292
- package/dist/lr-map-viewer.js +390 -384
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
# @zhangdali1996/lr-map-viewer
|
|
2
2
|
|
|
3
|
-
`@zhangdali1996/lr-map-viewer` 是面向 Vue 3
|
|
3
|
+
`@zhangdali1996/lr-map-viewer` 是面向 Vue 3 项目的三维地图组件库,提供龙软三维场景承载能力,以及基于组件实例的视角控制与模型信息查询能力。
|
|
4
4
|
|
|
5
5
|
主要能力:
|
|
6
6
|
|
|
7
|
-
- 支持 Vue 3
|
|
7
|
+
- 支持 Vue 3 项目中以组件方式挂载三维地图容器。
|
|
8
8
|
- 支持龙软三维 SDK 的运行时加载。
|
|
9
|
-
- 支持基于 `@longruan/lr-map` 的二维图纸显示。
|
|
10
9
|
- 支持通过运行时配置传入云 GIS 参数。
|
|
10
|
+
- 支持通过运行时配置显式传入三维场景 `basePoint`。
|
|
11
11
|
- 支持按需显示区域显隐面板和调试面板。
|
|
12
|
-
- 支持 `2d / 3d` 模式切换壳层。
|
|
13
12
|
- 支持通过组件实例调用 `moveView(x, y, z)` 移动三维视角。
|
|
14
13
|
- 支持通过组件实例注册 `registerModelInfoQuery(callback)` 查询点击模型信息。
|
|
15
14
|
|
|
@@ -53,96 +52,30 @@ public/
|
|
|
53
52
|
import { LrMapViewer } from '@zhangdali1996/lr-map-viewer'
|
|
54
53
|
|
|
55
54
|
const lr3dConfig = {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
//
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
// SDK 依赖的 jQuery 脚本地址
|
|
82
|
-
src: '/resource/js/jquery-3.1.1.min.js',
|
|
83
|
-
globalNames: ['jQuery', '$'],
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
scene: {
|
|
88
|
-
// 三维容器 ID,需要保证当前页面内唯一
|
|
89
|
-
containerId: 'customer-lr3d-viewer',
|
|
90
|
-
// 窗口尺寸变化时是否自动触发 resize
|
|
91
|
-
autoResize: true,
|
|
92
|
-
},
|
|
93
|
-
initOptions: {
|
|
94
|
-
// 是否显示 SDK 默认菜单
|
|
95
|
-
showMenu: false,
|
|
96
|
-
// 是否显示 SDK 默认工具栏
|
|
97
|
-
showToolbar: false,
|
|
98
|
-
// 是否显示 SDK 默认侧边栏
|
|
99
|
-
showSidebar: false,
|
|
100
|
-
// SDK 场景主题
|
|
101
|
-
theme: 'shallow',
|
|
102
|
-
// 初始 basePoint,组件内部会在加载云 GIS 数据后按地图范围重新计算
|
|
103
|
-
basePoint: { x: 0, y: 0, z: 0 },
|
|
104
|
-
},
|
|
105
|
-
dataSource: {
|
|
106
|
-
// 数据源类型,使用云 GIS 时传 cloud
|
|
107
|
-
type: 'cloud',
|
|
108
|
-
// 是否在场景初始化成功后自动加载云 GIS 数据
|
|
109
|
-
autoLoad: false,
|
|
110
|
-
// 数据加载模式,workfaceOnly 表示按工作面/区域/巷道组合加载
|
|
111
|
-
loadMode: 'workfaceOnly',
|
|
112
|
-
cloud: {
|
|
113
|
-
// 云 GIS 服务地址
|
|
114
|
-
server: '',
|
|
115
|
-
// 地图服务地址,用于获取地图元数据和范围
|
|
116
|
-
mapServerUrl: '',
|
|
117
|
-
// 云 GIS 用户名
|
|
118
|
-
username: '',
|
|
119
|
-
// 云 GIS 密码
|
|
120
|
-
password: '',
|
|
121
|
-
// 数据源 guid
|
|
122
|
-
dsGuid: '',
|
|
123
|
-
// 数据源名称
|
|
124
|
-
dsname: '',
|
|
125
|
-
laneSize: {
|
|
126
|
-
// 巷道渲染宽度
|
|
127
|
-
width: 10,
|
|
128
|
-
// 巷道渲染高度
|
|
129
|
-
height: 10,
|
|
130
|
-
},
|
|
131
|
-
// 需要加载的巷道图层名数组
|
|
132
|
-
// 不传时按服务返回结果处理,传入后会按图层名过滤
|
|
133
|
-
layers: [],
|
|
134
|
-
// 需要加载的煤层图层名数组
|
|
135
|
-
coalLayers: [],
|
|
136
|
-
// 需要加载的断层图层名数组
|
|
137
|
-
geofaultLayers: [],
|
|
138
|
-
// 工作面要素编码数组
|
|
139
|
-
workfaceFeatureTypes: ['0202030030'],
|
|
140
|
-
// 区域要素编码数组
|
|
141
|
-
regionFeatureTypes: ['0202030030', '0106020009', '0202030004', '0202030006'],
|
|
142
|
-
// 是否启用掘进辅助数据
|
|
143
|
-
enableRegionAssist: false,
|
|
144
|
-
// 是否启用巷道加载
|
|
145
|
-
enableLane: true,
|
|
55
|
+
// 是否在场景初始化成功后自动加载云 GIS 数据
|
|
56
|
+
autoLoad: true,
|
|
57
|
+
cloud: {
|
|
58
|
+
// 云 GIS 服务地址
|
|
59
|
+
server: 'https://your-cloud-gis-server/',
|
|
60
|
+
// 云 GIS 用户名
|
|
61
|
+
username: 'your_username',
|
|
62
|
+
// 云 GIS 密码
|
|
63
|
+
password: 'your_password',
|
|
64
|
+
// 数据源 guid
|
|
65
|
+
dsGuid: 'your_ds_guid',
|
|
66
|
+
// 三维场景基点
|
|
67
|
+
basePoint: {
|
|
68
|
+
x: 37517614.46684,
|
|
69
|
+
y: 4410289.679932,
|
|
70
|
+
z: 972.148557,
|
|
71
|
+
},
|
|
72
|
+
// 需要加载的巷道图层名
|
|
73
|
+
layers: ['your_lane_layer_name'],
|
|
74
|
+
laneSize: {
|
|
75
|
+
// 巷道渲染宽度
|
|
76
|
+
width: 10,
|
|
77
|
+
// 巷道渲染高度
|
|
78
|
+
height: 10,
|
|
146
79
|
},
|
|
147
80
|
},
|
|
148
81
|
}
|
|
@@ -165,62 +98,11 @@ const lr3dConfig = {
|
|
|
165
98
|
/>
|
|
166
99
|
```
|
|
167
100
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
`2d` 模式通过传入图纸运行参数完成初始化,使用方直接提供所需配置即可。
|
|
171
|
-
|
|
172
|
-
```vue
|
|
173
|
-
<script setup>
|
|
174
|
-
import { LrMapViewer } from '@zhangdali1996/lr-map-viewer'
|
|
175
|
-
|
|
176
|
-
const map2dConfig = {
|
|
177
|
-
behavior: {
|
|
178
|
-
// 初始化后是否自动创建默认图层
|
|
179
|
-
autoInitLayer: true,
|
|
180
|
-
// 初始化后是否自动显示默认图层
|
|
181
|
-
autoShowLayer: true,
|
|
182
|
-
// 是否捕获图层树结构
|
|
183
|
-
captureLayerTree: true,
|
|
184
|
-
},
|
|
185
|
-
options: {
|
|
186
|
-
// 云 GIS 数据源 guid
|
|
187
|
-
ygis_dsGuid: 'your_ygis_ds_guid',
|
|
188
|
-
// 云 GIS 服务地址
|
|
189
|
-
ygis_url: 'https://your-cloud-gis-server/',
|
|
190
|
-
// 地图服务地址
|
|
191
|
-
Url: 'https://your-map-server/',
|
|
192
|
-
// 二维图层名称
|
|
193
|
-
layerName: 'your_layer_name',
|
|
194
|
-
// 图层编码,不需要时可留空
|
|
195
|
-
layerCode: '',
|
|
196
|
-
// 初始显示范围
|
|
197
|
-
extent: 'minX,minY,maxX,maxY',
|
|
198
|
-
// 云 GIS 用户名
|
|
199
|
-
ygis_username: 'your_username',
|
|
200
|
-
// 云 GIS 密码
|
|
201
|
-
ygis_password: 'your_password',
|
|
202
|
-
// 是否旋转视图
|
|
203
|
-
rotate: false,
|
|
204
|
-
// 是否开启平移动画
|
|
205
|
-
animate: false,
|
|
206
|
-
// 是否开启缩放动画
|
|
207
|
-
zoomAnimation: false,
|
|
208
|
-
// 是否开启 marker 缩放动画
|
|
209
|
-
markerZoomAnimation: false,
|
|
210
|
-
// 是否开启淡入淡出动画
|
|
211
|
-
fadeAnimation: false,
|
|
212
|
-
},
|
|
213
|
-
}
|
|
214
|
-
</script>
|
|
215
|
-
|
|
216
|
-
<template>
|
|
217
|
-
<div style="height: 100vh;">
|
|
218
|
-
<LrMapViewer mode="2d" :modes="['2d', '3d']" :map2d-config="map2dConfig" />
|
|
219
|
-
</div>
|
|
220
|
-
</template>
|
|
221
|
-
```
|
|
101
|
+
说明:
|
|
222
102
|
|
|
223
|
-
|
|
103
|
+
- 三维组件已内置默认的 `sdk`、`scene`、`initOptions`、`dataSource.type`、`dataSource.loadMode` 配置,通常不需要手动传入。
|
|
104
|
+
- 推荐只传 `autoLoad` 和 `cloud` 下的业务参数即可。
|
|
105
|
+
- 如果你有特殊需求,仍然可以继续传完整的 `lr3dConfig` 结构来覆盖默认值。
|
|
224
106
|
|
|
225
107
|
## 推荐接入方式
|
|
226
108
|
|
|
@@ -244,14 +126,8 @@ createApp(App).use(LrMapViewerPlugin).mount('#app')
|
|
|
244
126
|
|
|
245
127
|
组件 Props:
|
|
246
128
|
|
|
247
|
-
- `mode`
|
|
248
|
-
组件显示模式,支持 `2d` 或 `3d`。
|
|
249
|
-
- `modes`
|
|
250
|
-
当前实例允许使用的模式集合。
|
|
251
129
|
- `lr3dConfig`
|
|
252
130
|
龙软三维运行时配置。
|
|
253
|
-
- `map2dConfig`
|
|
254
|
-
二维地图运行时配置对象。
|
|
255
131
|
- `showRegionPanel`
|
|
256
132
|
是否显示区域显隐面板,默认 `false`。
|
|
257
133
|
- `showDebugPanel`
|
|
@@ -262,7 +138,6 @@ createApp(App).use(LrMapViewerPlugin).mount('#app')
|
|
|
262
138
|
- `switchMode(mode)`
|
|
263
139
|
- `getCurrentMode()`
|
|
264
140
|
- `getCurrentEngine()`
|
|
265
|
-
- `get2dInstance()`
|
|
266
141
|
- `get3dInstance()`
|
|
267
142
|
- `resize()`
|
|
268
143
|
- `refreshScene()`
|
|
@@ -271,8 +146,7 @@ createApp(App).use(LrMapViewerPlugin).mount('#app')
|
|
|
271
146
|
|
|
272
147
|
说明:
|
|
273
148
|
|
|
274
|
-
- `
|
|
275
|
-
- `refreshScene()` 仅对 `3d` 模式有效。
|
|
149
|
+
- `refreshScene()` 仅对三维场景有效。
|
|
276
150
|
- `moveView(x, y, z)` 传入的是绝对三维坐标,组件内部会自动换算成相对 `basePoint` 坐标后调用聚焦接口。
|
|
277
151
|
- `registerModelInfoQuery(callback)` 会在用户点击三维中的模型对象时触发回调。
|
|
278
152
|
- 模型信息查询返回 4 个字段:`id`、`name`、`layerName`、`position`。
|
|
@@ -346,33 +220,67 @@ watch(
|
|
|
346
220
|
|
|
347
221
|
## 云 GIS 配置说明
|
|
348
222
|
|
|
349
|
-
|
|
223
|
+
推荐写法:
|
|
350
224
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
-
|
|
356
|
-
|
|
225
|
+
```js
|
|
226
|
+
const lr3dConfig = {
|
|
227
|
+
autoLoad: true,
|
|
228
|
+
cloud: {
|
|
229
|
+
server: 'https://your-cloud-gis-server/',
|
|
230
|
+
username: 'your_username',
|
|
231
|
+
password: 'your_password',
|
|
232
|
+
dsGuid: 'your_ds_guid',
|
|
233
|
+
basePoint: {
|
|
234
|
+
x: 37517614.46684,
|
|
235
|
+
y: 4410289.679932,
|
|
236
|
+
z: 972.148557,
|
|
237
|
+
},
|
|
238
|
+
layers: ['your_lane_layer_name'],
|
|
239
|
+
laneSize: {
|
|
240
|
+
width: 10,
|
|
241
|
+
height: 10,
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
必填字段:
|
|
248
|
+
|
|
249
|
+
- `autoLoad`
|
|
250
|
+
是否在场景初始化成功后自动加载云 GIS 数据。
|
|
251
|
+
- `cloud.server`
|
|
252
|
+
云 GIS 服务地址。
|
|
253
|
+
- `cloud.username`
|
|
254
|
+
云 GIS 用户名。
|
|
255
|
+
- `cloud.password`
|
|
256
|
+
云 GIS 密码。
|
|
257
|
+
- `cloud.dsGuid`
|
|
258
|
+
数据源 guid。
|
|
259
|
+
- `cloud.basePoint.x`
|
|
260
|
+
三维场景基点 x 坐标。
|
|
261
|
+
- `cloud.basePoint.y`
|
|
262
|
+
三维场景基点 y 坐标。
|
|
263
|
+
- `cloud.basePoint.z`
|
|
264
|
+
三维场景基点 z 坐标。
|
|
357
265
|
|
|
358
266
|
可选字段:
|
|
359
267
|
|
|
360
|
-
- `
|
|
268
|
+
- `cloud.layers`
|
|
269
|
+
需要加载的巷道图层名数组。
|
|
270
|
+
- `cloud.laneSize.width`
|
|
361
271
|
巷道渲染宽度,默认 `10`
|
|
362
|
-
- `laneSize.height`
|
|
272
|
+
- `cloud.laneSize.height`
|
|
363
273
|
巷道渲染高度,默认 `10`
|
|
274
|
+
- `cloud.mapServerUrl`
|
|
275
|
+
可按业务需要继续透传,但不再用于组件内部计算 `basePoint`。
|
|
276
|
+
- `cloud.dsname`
|
|
277
|
+
可按业务需要继续透传,但不再作为三维基础加载必填项。
|
|
364
278
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
```js
|
|
368
|
-
dataSource: {
|
|
369
|
-
autoLoad: true
|
|
370
|
-
}
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
则组件初始化成功后会自动尝试加载云 GIS 数据。
|
|
279
|
+
兼容说明:
|
|
374
280
|
|
|
375
|
-
|
|
281
|
+
- 组件内部仍兼容完整的 `lr3dConfig` 写法。
|
|
282
|
+
- `basePoint` 推荐传入 `{ x, y, z }` 对象。
|
|
283
|
+
- 如果你需要覆盖 SDK 路径、容器参数、初始化参数等高级配置,仍然可以继续传入 `sdk`、`scene`、`initOptions`、`dataSource` 完整结构。
|
|
376
284
|
|
|
377
285
|
## 示例配置
|
|
378
286
|
|
|
@@ -380,97 +288,21 @@ dataSource: {
|
|
|
380
288
|
|
|
381
289
|
```js
|
|
382
290
|
const playgroundLr3dConfig = {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
globalNames: ['lr3dapp', 'EditorApp'],
|
|
390
|
-
dependencies: [
|
|
391
|
-
{
|
|
392
|
-
// THREE 依赖脚本地址
|
|
393
|
-
src: '/resource/js/three.min.js',
|
|
394
|
-
globalNames: ['THREE'],
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
// SDK 依赖的 Vue2 脚本地址
|
|
398
|
-
src: '/resource/js/vue.2.6.11.js',
|
|
399
|
-
globalNames: ['Vue'],
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
// SDK 依赖的 element-ui 脚本地址
|
|
403
|
-
src: '/resource/js/element_ui.js',
|
|
404
|
-
globalNames: ['ELEMENT'],
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
// SDK 依赖的 jQuery 脚本地址
|
|
408
|
-
src: '/resource/js/jquery-3.1.1.min.js',
|
|
409
|
-
globalNames: ['jQuery', '$'],
|
|
410
|
-
},
|
|
411
|
-
],
|
|
412
|
-
},
|
|
413
|
-
scene: {
|
|
414
|
-
// playground 中三维容器 ID
|
|
415
|
-
containerId: 'playground-lr3d-viewer',
|
|
416
|
-
// 窗口尺寸变化时自动触发 resize
|
|
417
|
-
autoResize: true,
|
|
418
|
-
},
|
|
419
|
-
initOptions: {
|
|
420
|
-
// 不显示 SDK 默认菜单
|
|
421
|
-
showMenu: false,
|
|
422
|
-
// 不显示 SDK 默认工具栏
|
|
423
|
-
showToolbar: false,
|
|
424
|
-
// 不显示 SDK 默认侧边栏
|
|
425
|
-
showSidebar: false,
|
|
426
|
-
// 场景主题
|
|
427
|
-
theme: 'shallow',
|
|
291
|
+
autoLoad: true,
|
|
292
|
+
cloud: {
|
|
293
|
+
server: 'https://your-cloud-gis-server/',
|
|
294
|
+
username: 'your_username',
|
|
295
|
+
password: 'your_password',
|
|
296
|
+
dsGuid: 'your_ds_guid',
|
|
428
297
|
basePoint: {
|
|
429
|
-
x:
|
|
430
|
-
y:
|
|
431
|
-
z:
|
|
298
|
+
x: 37517614.46684,
|
|
299
|
+
y: 4410289.679932,
|
|
300
|
+
z: 972.148557,
|
|
432
301
|
},
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
// 初始化完成后自动加载云 GIS 数据
|
|
438
|
-
autoLoad: true,
|
|
439
|
-
// 按工作面模式加载
|
|
440
|
-
loadMode: 'workfaceOnly',
|
|
441
|
-
cloud: {
|
|
442
|
-
// 云 GIS 服务地址
|
|
443
|
-
server: 'https://your-cloud-gis-server/',
|
|
444
|
-
// 地图服务地址
|
|
445
|
-
mapServerUrl: 'https://your-map-server/',
|
|
446
|
-
// 云 GIS 用户名
|
|
447
|
-
username: 'your_username',
|
|
448
|
-
// 云 GIS 密码
|
|
449
|
-
password: 'your_password',
|
|
450
|
-
// 数据源 guid
|
|
451
|
-
dsGuid: 'your_ds_guid',
|
|
452
|
-
// 数据源名称
|
|
453
|
-
dsname: 'your_ds_name',
|
|
454
|
-
// 需要加载的巷道图层名
|
|
455
|
-
layers: ['your_lane_layer_name'],
|
|
456
|
-
laneSize: {
|
|
457
|
-
// 巷道宽度
|
|
458
|
-
width: 10,
|
|
459
|
-
// 巷道高度
|
|
460
|
-
height: 10,
|
|
461
|
-
},
|
|
462
|
-
// 需要加载的煤层图层名
|
|
463
|
-
coalLayers: ['your_coal_layer_name'],
|
|
464
|
-
// 需要加载的断层图层名
|
|
465
|
-
geofaultLayers: [],
|
|
466
|
-
// 工作面要素编码数组
|
|
467
|
-
workfaceFeatureTypes: ['0202030030'],
|
|
468
|
-
// 区域要素编码数组
|
|
469
|
-
regionFeatureTypes: ['0202030030', '0106020009', '0202030004', '0202030006'],
|
|
470
|
-
// 是否启用掘进辅助数据
|
|
471
|
-
enableRegionAssist: false,
|
|
472
|
-
// 是否启用巷道加载
|
|
473
|
-
enableLane: true,
|
|
302
|
+
layers: ['your_lane_layer_name'],
|
|
303
|
+
laneSize: {
|
|
304
|
+
width: 10,
|
|
305
|
+
height: 10,
|
|
474
306
|
},
|
|
475
307
|
},
|
|
476
308
|
}
|
|
@@ -490,7 +322,7 @@ const playgroundLr3dConfig = {
|
|
|
490
322
|
|
|
491
323
|
1. 确认客户项目里确实存在 `public/resource/js/jquery-3.1.1.min.js`。
|
|
492
324
|
2. 确认浏览器访问 `/resource/js/jquery-3.1.1.min.js` 返回 200,而不是 404。
|
|
493
|
-
3.
|
|
325
|
+
3. 如果资源目录不在根路径,使用完整 `lr3dConfig.sdk.dependencies` 配置覆盖默认脚本路径。
|
|
494
326
|
4. 确认 `editorapp` 与 `resource` 属于同一套 SDK 版本,不要混用不同批次文件。
|
|
495
327
|
|
|
496
328
|
### 2. 场景初始化失败:未检测到全局对象
|
|
@@ -499,7 +331,7 @@ const playgroundLr3dConfig = {
|
|
|
499
331
|
|
|
500
332
|
排查方向:
|
|
501
333
|
|
|
502
|
-
1.
|
|
334
|
+
1. 检查使用的 SDK 版本是否与组件默认配置匹配。
|
|
503
335
|
2. 检查脚本是否被浏览器拦截、跨域策略阻止,或返回了错误 HTML 页面。
|
|
504
336
|
3. 检查依赖加载顺序是否正确,前置依赖必须先于 `editorapp.bundle.js` 完成加载。
|
|
505
337
|
|
|
@@ -508,30 +340,8 @@ const playgroundLr3dConfig = {
|
|
|
508
340
|
典型原因:
|
|
509
341
|
|
|
510
342
|
- 组件库默认配置已不再携带真实业务参数。
|
|
511
|
-
- 接入方没有传入 `server`、`
|
|
343
|
+
- 接入方没有传入 `server`、`username`、`password`、`dsGuid`、`basePoint`。
|
|
512
344
|
|
|
513
345
|
处理方式:
|
|
514
346
|
|
|
515
|
-
- 在 `lr3dConfig.
|
|
516
|
-
|
|
517
|
-
### 4. 切换到 2D 后提示配置不完整
|
|
518
|
-
|
|
519
|
-
当前二维模式要求 `map2dConfig.options` 至少传入:
|
|
520
|
-
|
|
521
|
-
- `ygis_dsGuid`
|
|
522
|
-
- `ygis_url`
|
|
523
|
-
- `Url`
|
|
524
|
-
- `layerName`
|
|
525
|
-
- `token` 或 `ygis_username + ygis_password`
|
|
526
|
-
|
|
527
|
-
如果缺少这些字段,组件会直接在页面顶部提示缺失项,而不会继续初始化二维地图。
|
|
528
|
-
|
|
529
|
-
## 本地联调
|
|
530
|
-
|
|
531
|
-
在仓库根目录执行:
|
|
532
|
-
|
|
533
|
-
```bash
|
|
534
|
-
npm run dev:playground
|
|
535
|
-
```
|
|
536
|
-
|
|
537
|
-
该命令会启动示例工程 [`playground/src/App.vue`](/F:/WorkSpace/jzxy/cloud-gis-3d/playground/src/App.vue),可用于本地联调和接口验证。
|
|
347
|
+
- 在 `lr3dConfig.cloud` 中补齐实际项目所需字段。
|