zbcx_swfx
v0.1.2
Published
三维分析面板组件包,提供 `mountSwfxAnalysisPanel` 方法用于在指定容器中打开分析面板。
Readme
zbcx_swfx
三维分析面板组件包,提供 mountSwfxAnalysisPanel 方法用于在指定容器中打开分析面板。
安装
发布后通过 npm 安装:
npm install zbcx_swfx基础用法
需要在 Cesium viewer 和当前 tileset 初始化完成后调用。CSS 必须引入。
import { mountSwfxAnalysisPanel } from 'zbcx_swfx'
import 'zbcx_swfx/swfx-analysis.css'
const panel = mountSwfxAnalysisPanel({
target: 'mapContainer',
getContext: () => ({ viewer, tileset, legends }),
theme: 'light-blue',
analysisTypes: ['pm', 'pt', 'kw', 'sd', 'bz'],
defaultAnalysisType: 'pm',
position: { top: 80, right: 32 }
})
// 不再使用时销毁
panel.destroy()mountSwfxAnalysisPanel 参数
分析类型编码
| 编码 | 功能 |
| --- | --- |
| pm | 剖面分析 |
| pt | 剖体分析 |
| kw | 开挖分析,包含土方量统计 |
| zk | 钻孔分析 |
| sd | 隧道分析 |
| bz | 模型爆炸 |
| roam | 路径漫游 |
| attr | 属性查询 |
| ctx | 构建模型上下文缓存 |
