@zhangdali1996/lr-map-viewer 0.0.4 → 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 +30 -43
- package/dist/lr-map-viewer.js +390 -384
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
- 支持 Vue 3 项目中以组件方式挂载三维地图容器。
|
|
8
8
|
- 支持龙软三维 SDK 的运行时加载。
|
|
9
9
|
- 支持通过运行时配置传入云 GIS 参数。
|
|
10
|
+
- 支持通过运行时配置显式传入三维场景 `basePoint`。
|
|
10
11
|
- 支持按需显示区域显隐面板和调试面板。
|
|
11
12
|
- 支持通过组件实例调用 `moveView(x, y, z)` 移动三维视角。
|
|
12
13
|
- 支持通过组件实例注册 `registerModelInfoQuery(callback)` 查询点击模型信息。
|
|
@@ -56,16 +57,18 @@ const lr3dConfig = {
|
|
|
56
57
|
cloud: {
|
|
57
58
|
// 云 GIS 服务地址
|
|
58
59
|
server: 'https://your-cloud-gis-server/',
|
|
59
|
-
// 地图服务地址
|
|
60
|
-
mapServerUrl: 'https://your-map-server/',
|
|
61
60
|
// 云 GIS 用户名
|
|
62
61
|
username: 'your_username',
|
|
63
62
|
// 云 GIS 密码
|
|
64
63
|
password: 'your_password',
|
|
65
64
|
// 数据源 guid
|
|
66
65
|
dsGuid: 'your_ds_guid',
|
|
67
|
-
//
|
|
68
|
-
|
|
66
|
+
// 三维场景基点
|
|
67
|
+
basePoint: {
|
|
68
|
+
x: 37517614.46684,
|
|
69
|
+
y: 4410289.679932,
|
|
70
|
+
z: 972.148557,
|
|
71
|
+
},
|
|
69
72
|
// 需要加载的巷道图层名
|
|
70
73
|
layers: ['your_lane_layer_name'],
|
|
71
74
|
laneSize: {
|
|
@@ -74,15 +77,6 @@ const lr3dConfig = {
|
|
|
74
77
|
// 巷道渲染高度
|
|
75
78
|
height: 10,
|
|
76
79
|
},
|
|
77
|
-
// 需要加载的煤层图层名数组
|
|
78
|
-
coalLayers: ['your_coal_layer_name'],
|
|
79
|
-
// 需要加载的断层图层名数组
|
|
80
|
-
geofaultLayers: [],
|
|
81
|
-
// 以下开关和要素编码均提供默认值,按需覆盖即可
|
|
82
|
-
workfaceFeatureTypes: ['0202030030'],
|
|
83
|
-
regionFeatureTypes: ['0202030030', '0106020009', '0202030004', '0202030006'],
|
|
84
|
-
enableRegionAssist: false,
|
|
85
|
-
enableLane: true,
|
|
86
80
|
},
|
|
87
81
|
}
|
|
88
82
|
</script>
|
|
@@ -233,18 +227,19 @@ const lr3dConfig = {
|
|
|
233
227
|
autoLoad: true,
|
|
234
228
|
cloud: {
|
|
235
229
|
server: 'https://your-cloud-gis-server/',
|
|
236
|
-
mapServerUrl: 'https://your-map-server/',
|
|
237
230
|
username: 'your_username',
|
|
238
231
|
password: 'your_password',
|
|
239
232
|
dsGuid: 'your_ds_guid',
|
|
240
|
-
|
|
233
|
+
basePoint: {
|
|
234
|
+
x: 37517614.46684,
|
|
235
|
+
y: 4410289.679932,
|
|
236
|
+
z: 972.148557,
|
|
237
|
+
},
|
|
241
238
|
layers: ['your_lane_layer_name'],
|
|
242
239
|
laneSize: {
|
|
243
240
|
width: 10,
|
|
244
241
|
height: 10,
|
|
245
242
|
},
|
|
246
|
-
coalLayers: ['your_coal_layer_name'],
|
|
247
|
-
geofaultLayers: [],
|
|
248
243
|
},
|
|
249
244
|
}
|
|
250
245
|
```
|
|
@@ -255,16 +250,18 @@ const lr3dConfig = {
|
|
|
255
250
|
是否在场景初始化成功后自动加载云 GIS 数据。
|
|
256
251
|
- `cloud.server`
|
|
257
252
|
云 GIS 服务地址。
|
|
258
|
-
- `cloud.mapServerUrl`
|
|
259
|
-
地图服务地址。
|
|
260
253
|
- `cloud.username`
|
|
261
254
|
云 GIS 用户名。
|
|
262
255
|
- `cloud.password`
|
|
263
256
|
云 GIS 密码。
|
|
264
257
|
- `cloud.dsGuid`
|
|
265
258
|
数据源 guid。
|
|
266
|
-
- `cloud.
|
|
267
|
-
|
|
259
|
+
- `cloud.basePoint.x`
|
|
260
|
+
三维场景基点 x 坐标。
|
|
261
|
+
- `cloud.basePoint.y`
|
|
262
|
+
三维场景基点 y 坐标。
|
|
263
|
+
- `cloud.basePoint.z`
|
|
264
|
+
三维场景基点 z 坐标。
|
|
268
265
|
|
|
269
266
|
可选字段:
|
|
270
267
|
|
|
@@ -274,22 +271,15 @@ const lr3dConfig = {
|
|
|
274
271
|
巷道渲染宽度,默认 `10`
|
|
275
272
|
- `cloud.laneSize.height`
|
|
276
273
|
巷道渲染高度,默认 `10`
|
|
277
|
-
- `cloud.
|
|
278
|
-
|
|
279
|
-
- `cloud.
|
|
280
|
-
|
|
281
|
-
- `cloud.workfaceFeatureTypes`
|
|
282
|
-
工作面要素编码数组,不传时使用默认值。
|
|
283
|
-
- `cloud.regionFeatureTypes`
|
|
284
|
-
区域要素编码数组,不传时使用默认值。
|
|
285
|
-
- `cloud.enableRegionAssist`
|
|
286
|
-
是否启用掘进辅助数据,默认 `false`。
|
|
287
|
-
- `cloud.enableLane`
|
|
288
|
-
是否启用巷道加载,默认 `true`。
|
|
274
|
+
- `cloud.mapServerUrl`
|
|
275
|
+
可按业务需要继续透传,但不再用于组件内部计算 `basePoint`。
|
|
276
|
+
- `cloud.dsname`
|
|
277
|
+
可按业务需要继续透传,但不再作为三维基础加载必填项。
|
|
289
278
|
|
|
290
279
|
兼容说明:
|
|
291
280
|
|
|
292
281
|
- 组件内部仍兼容完整的 `lr3dConfig` 写法。
|
|
282
|
+
- `basePoint` 推荐传入 `{ x, y, z }` 对象。
|
|
293
283
|
- 如果你需要覆盖 SDK 路径、容器参数、初始化参数等高级配置,仍然可以继续传入 `sdk`、`scene`、`initOptions`、`dataSource` 完整结构。
|
|
294
284
|
|
|
295
285
|
## 示例配置
|
|
@@ -301,22 +291,19 @@ const playgroundLr3dConfig = {
|
|
|
301
291
|
autoLoad: true,
|
|
302
292
|
cloud: {
|
|
303
293
|
server: 'https://your-cloud-gis-server/',
|
|
304
|
-
mapServerUrl: 'https://your-map-server/',
|
|
305
294
|
username: 'your_username',
|
|
306
295
|
password: 'your_password',
|
|
307
296
|
dsGuid: 'your_ds_guid',
|
|
308
|
-
|
|
297
|
+
basePoint: {
|
|
298
|
+
x: 37517614.46684,
|
|
299
|
+
y: 4410289.679932,
|
|
300
|
+
z: 972.148557,
|
|
301
|
+
},
|
|
309
302
|
layers: ['your_lane_layer_name'],
|
|
310
303
|
laneSize: {
|
|
311
304
|
width: 10,
|
|
312
305
|
height: 10,
|
|
313
306
|
},
|
|
314
|
-
coalLayers: ['your_coal_layer_name'],
|
|
315
|
-
geofaultLayers: [],
|
|
316
|
-
workfaceFeatureTypes: ['0202030030'],
|
|
317
|
-
regionFeatureTypes: ['0202030030', '0106020009', '0202030004', '0202030006'],
|
|
318
|
-
enableRegionAssist: false,
|
|
319
|
-
enableLane: true,
|
|
320
307
|
},
|
|
321
308
|
}
|
|
322
309
|
```
|
|
@@ -353,8 +340,8 @@ const playgroundLr3dConfig = {
|
|
|
353
340
|
典型原因:
|
|
354
341
|
|
|
355
342
|
- 组件库默认配置已不再携带真实业务参数。
|
|
356
|
-
- 接入方没有传入 `server`、`
|
|
343
|
+
- 接入方没有传入 `server`、`username`、`password`、`dsGuid`、`basePoint`。
|
|
357
344
|
|
|
358
345
|
处理方式:
|
|
359
346
|
|
|
360
|
-
- 在 `lr3dConfig.cloud` 中补齐实际项目所需字段。
|
|
347
|
+
- 在 `lr3dConfig.cloud` 中补齐实际项目所需字段。
|