@zhangdali1996/lr-map-viewer 0.0.159 → 0.0.162
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 -30
- package/dist/lr-map-viewer.css +1 -1
- package/dist/lr-map-viewer.js +12565 -10395
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -391,11 +391,11 @@ createApp(App).use(LrMapViewerPlugin).mount('#app')
|
|
|
391
391
|
- `setRangeSelection(center, options)`
|
|
392
392
|
- `setRangeSelectionByCoordinate(center, options)`
|
|
393
393
|
- `setRangeSelectionRadius(radius)`
|
|
394
|
-
- `clearRangeSelection()`
|
|
395
|
-
- `getRangeSelectionResult()`
|
|
396
|
-
- `exportRangeSelectionPersons(options)`
|
|
397
|
-
- `registerRangeSelectionChange(callback)`
|
|
398
|
-
- `focusMonitorPoint(target)`
|
|
394
|
+
- `clearRangeSelection()`
|
|
395
|
+
- `getRangeSelectionResult()`
|
|
396
|
+
- `exportRangeSelectionPersons(options)`
|
|
397
|
+
- `registerRangeSelectionChange(callback)`
|
|
398
|
+
- `focusMonitorPoint(target)`
|
|
399
399
|
|
|
400
400
|
说明:
|
|
401
401
|
|
|
@@ -403,12 +403,12 @@ createApp(App).use(LrMapViewerPlugin).mount('#app')
|
|
|
403
403
|
- `cancelRangeSelection(options)` 用于取消当前范围选点,可通过 `options.preserveCurrentResult` 控制是否保留当前结果。
|
|
404
404
|
- `setRangeSelection(center, options)` 用于直接传入三维坐标生成球形范围,适合业务系统通过外部坐标直接驱动范围选点。
|
|
405
405
|
- `setRangeSelectionByCoordinate(center, options)` 用于通过外部接口传入坐标生成球形范围,内部复用 `setRangeSelection` 的范围绘制、测点过滤和回调链路。
|
|
406
|
-
- `setRangeSelectionRadius(radius)` 用于更新当前范围半径;如果当前已完成选点,会同步更新球体和范围内测点。
|
|
407
|
-
- `clearRangeSelection()` 用于清除当前范围球、选点标记和测点过滤结果。
|
|
408
|
-
- `getRangeSelectionResult()` 返回当前范围选点结果,包含状态、半径、球心坐标、当前巷道信息和范围内测点列表。
|
|
409
|
-
- `exportRangeSelectionPersons(options)` 用于将当前范围内人员定位对象的 `name` 和 `card_id` 导出为 JSON 文件,可通过 `options.filename` 指定文件名。
|
|
410
|
-
- `registerRangeSelectionChange(callback)` 会在开始选点、选点完成、半径变化、取消、清除时触发回调。
|
|
411
|
-
- `focusMonitorPoint(target)` 用于定位并打开指定测点的信息窗,支持传测点 `id` 或测点对象。
|
|
406
|
+
- `setRangeSelectionRadius(radius)` 用于更新当前范围半径;如果当前已完成选点,会同步更新球体和范围内测点。
|
|
407
|
+
- `clearRangeSelection()` 用于清除当前范围球、选点标记和测点过滤结果。
|
|
408
|
+
- `getRangeSelectionResult()` 返回当前范围选点结果,包含状态、半径、球心坐标、当前巷道信息和范围内测点列表。
|
|
409
|
+
- `exportRangeSelectionPersons(options)` 用于将当前范围内人员定位对象的 `name` 和 `card_id` 导出为 JSON 文件,可通过 `options.filename` 指定文件名。
|
|
410
|
+
- `registerRangeSelectionChange(callback)` 会在开始选点、选点完成、半径变化、取消、清除时触发回调。
|
|
411
|
+
- `focusMonitorPoint(target)` 用于定位并打开指定测点的信息窗,支持传测点 `id` 或测点对象。
|
|
412
412
|
|
|
413
413
|
## 二维图纸配置说明
|
|
414
414
|
|
|
@@ -590,18 +590,18 @@ function clearRangeSelection() {
|
|
|
590
590
|
viewerRef.value?.clearRangeSelection?.()
|
|
591
591
|
}
|
|
592
592
|
|
|
593
|
-
function focusFirstMonitorPoint() {
|
|
594
|
-
const result = viewerRef.value?.getRangeSelectionResult?.()
|
|
595
|
-
const firstMonitorPoint = result?.monitorPoints?.[0]
|
|
596
|
-
|
|
597
|
-
if (firstMonitorPoint) {
|
|
598
|
-
viewerRef.value?.focusMonitorPoint?.(firstMonitorPoint)
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
function exportRangeSelectionPersons() {
|
|
603
|
-
viewerRef.value?.exportRangeSelectionPersons?.()
|
|
604
|
-
}
|
|
593
|
+
function focusFirstMonitorPoint() {
|
|
594
|
+
const result = viewerRef.value?.getRangeSelectionResult?.()
|
|
595
|
+
const firstMonitorPoint = result?.monitorPoints?.[0]
|
|
596
|
+
|
|
597
|
+
if (firstMonitorPoint) {
|
|
598
|
+
viewerRef.value?.focusMonitorPoint?.(firstMonitorPoint)
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
function exportRangeSelectionPersons() {
|
|
603
|
+
viewerRef.value?.exportRangeSelectionPersons?.()
|
|
604
|
+
}
|
|
605
605
|
|
|
606
606
|
watch(
|
|
607
607
|
viewerRef,
|
|
@@ -621,13 +621,13 @@ watch(
|
|
|
621
621
|
<template>
|
|
622
622
|
<div style="height: 100vh;">
|
|
623
623
|
<button type="button" @click="startRangeSelection">开始范围选点</button>
|
|
624
|
-
<button type="button" @click="setRangeSelectionByCoordinate">按坐标生成范围</button>
|
|
625
|
-
<button type="button" @click="clearRangeSelection">清除范围</button>
|
|
626
|
-
<button type="button" @click="focusFirstMonitorPoint">定位首个测点</button>
|
|
627
|
-
<button type="button" @click="exportRangeSelectionPersons">导出范围人员</button>
|
|
628
|
-
<LrMapViewer ref="viewerRef" :lr3d-config="lr3dConfig" />
|
|
629
|
-
</div>
|
|
630
|
-
</template>
|
|
624
|
+
<button type="button" @click="setRangeSelectionByCoordinate">按坐标生成范围</button>
|
|
625
|
+
<button type="button" @click="clearRangeSelection">清除范围</button>
|
|
626
|
+
<button type="button" @click="focusFirstMonitorPoint">定位首个测点</button>
|
|
627
|
+
<button type="button" @click="exportRangeSelectionPersons">导出范围人员</button>
|
|
628
|
+
<LrMapViewer ref="viewerRef" :lr3d-config="lr3dConfig" />
|
|
629
|
+
</div>
|
|
630
|
+
</template>
|
|
631
631
|
```
|
|
632
632
|
|
|
633
633
|
如果你需要切换二维与三维模式:
|