1. BOSGeoUI

BOSGeoUI是BOGeoViewer的UI和交互类,是基于引擎库BOSGeo开发的结合UI交互的综合展示应用程序入口。

1.1. new BOSGeoUI(options)

Param Type Default Description
options Object

包含以下参数的Object对象

options.geomap GeoMap

geomap三维地图对象

[options.layerConfigUrl] String

图层内容列表,可修改为用户自定义的服务地址

[options.toolBoxControl=true] Boolean

底部工具栏设置按钮是否开启

[options.toolBox] Object

底部工具栏配置

[options.toolBox.layerManage=true] Boolean

图层管理工具开关

[options.toolBox.roam=true] Boolean

漫游工具开关

[options.toolBox.snapShot=true] Boolean

快照管理工具开关

[options.toolBox.measure=true] Boolean

测量工具开关

[options.toolBox.analysis=true] Boolean

空间分析工具开关

[options.toolBox.draw=true] Boolean

绘制工具开关

[options.basicTool] Object

视图控制工具

[options.basicTool.home=true] Boolean

主页工具开关

[options.basicTool.full=true] Boolean

全屏工具开关

[options.basicTool.zoomin=true] Boolean

放大工具开关

[options.basicTool.zoomout=true] Boolean

缩小工具开关

[options.basicTool.north=true] Boolean

指北针工具开关

逻辑说明

options.toolBoxControl为true时可以控制动态调整工具栏中工具的显隐。

Example

new BOSGeoUI({
    geomap: geomap, //三维地图引擎
    layerConfigUrl: 'https://bosgeo.boswinner.com/layersSetting.json',//图层内容列表,可修改为用户自定义的服务地址
    toolBoxControl: true, //底部工具栏设置按钮
    toolBox: {    //底部工具栏
        layerManage: true, //图层管理
        roam: true, //漫游
        snapshot: true, //快照管理
        measure: true, //测量
        analysis: true, //空间分析
        draw: true, //绘制
    },
    basicTool: {//视图控制工具
        home: true, //主页
        full: true, //全屏
        zoomin: true, //放大
        zoomout: true, //缩小
        north: true, //指北针
    },
});

1.2. 属性

Name Type Description
informationMap Object

存储模型调整信息informationMap.modelAdjust,模型调整后才会存在。

1.3. 方法

1.3.1. BOSGeoUI.createSnapShot(width, height)

按一定尺寸创建当前的快照。

Returns :

当前视图的截图,格式为base64字符串

Param Type Description
width Number

宽度

height Number

高度

1.3.2. BOSGeoUI.setToolBoxItemsShow(options)

控制底部工具栏的显隐

Param Type Description
toolBox Object

包含以下参数的Object对象:

toolBox.layerManage Boolean

图层管理开关

toolBox.roam Boolean

漫游开关

toolBox.snapShot Boolean

快照管理开关

toolBox.measure Boolean

测量开关

toolBox.analysis Boolean

空间分析开关

toolBox.draw Boolean

绘制开关

toolBox.label Boolean

标签开关

toolBox.surface Boolean

地表透明开关

toolBox.modelAdjustTool Boolean

位置调整

Example

let toolBox = {
    layerManage: false,//图层管理
    roam: false,//漫游
    snapShot: false,//快照管理
    measure: false,//测量
    analysis: false,//空间分析
    draw: true,//绘制
    label: true,//标签
    surface: true,//地表透明
    newModelAdjust: true,//位置调整
}
geoUI.setToolBoxItemsShow(toolBox)

1.3.3. BOSGeoUI.setBasicToolsExist(options)

控制视图控制工具的显隐

Param Type Description
basicTool Object

包含以下参数的Object对象:

basicTool.home Boolean

主页开关

basicTool.full Boolean

全屏开关

basicTool.zoomin Boolean

放大开关

basicTool.zoomout Boolean

缩小开关

basicTool.north Boolean

指北针开关

Example

let basicTool = {
    home: false,//主页
    full: true,//全屏
    zoomin: false,//放大
    zoomout: false,//缩小
    north: false,//指北针
}
geoUI.setBasicToolItemsShow(basicTool)

1.3.4. BOSGeoUI.setBimSceneToolItemsShow(options)

控制视图控制工具的显隐

Param Type Description
bimSceneTools Object

包含以下参数的Object对象:

bimSceneTools.featureInfo Boolean

构件信息开关

bimSceneTools.buildsearch Boolean

构件查找开关

bimSceneTools.featureColor Boolean

模型上色开关

bimSceneTools.modeltree Boolean

模型树开关

bimSceneTools.modelCut Boolean

模型剖切开关

bimSceneTools.modelAdjust Boolean

模型调整开关

Example

let bimSceneTools = {
    featureInfo: false,//构件信息
    buildsearch: false,//构件查找
    featureColor: false,//模型上色
    modeltree: false,//模型树
    modelCut: false,//模型剖切
    modelAdjust: false,//模型调整
}
geoUI.setBimSceneToolItemsShow(bimSceneTools)

1.3.5. BOSGeoUI.destroy()

销毁ui对象

Example

geoUI.destroy()
版权所有@盈嘉互联(北京)科技有限公司 京ICP备15051988号-9 Copyright © 2022 all right reserved,powered by Gitbook该文件修订时间: 2022-05-16 18:19:54

results matching ""

    No results matching ""