跨~界开发者中心 跨~界开发者中心
首页
  • 开发环境
  • 转换服务
  • API接口

    • 基础类
    • 工具类
    • 界面类
    • 场景类
    • 构件类
    • 标签装饰类
    • 地图实景类
    • 模型类
    • 事件类
    • 相机类
    • 脚本类
    • 几何类
  • 初版接口

    • 全局接口
    • 工具接口
    • API接口
  • 框架相关
  • 界面相关
  • 场景相关
  • 模型相关
  • 工具相关
  • 功能模块

    • 脚本接口
  • API示例

    • API示例说明
    • API示例下载
  • SDK示例

    • UIApp
    • SceneApp
    • ViewsApp
    • GeometryApp
    • ElementApp
    • ToolApp
访问新版 (opens new window)
首页
  • 开发环境
  • 转换服务
  • API接口

    • 基础类
    • 工具类
    • 界面类
    • 场景类
    • 构件类
    • 标签装饰类
    • 地图实景类
    • 模型类
    • 事件类
    • 相机类
    • 脚本类
    • 几何类
  • 初版接口

    • 全局接口
    • 工具接口
    • API接口
  • 框架相关
  • 界面相关
  • 场景相关
  • 模型相关
  • 工具相关
  • 功能模块

    • 脚本接口
  • API示例

    • API示例说明
    • API示例下载
  • SDK示例

    • UIApp
    • SceneApp
    • ViewsApp
    • GeometryApp
    • ElementApp
    • ToolApp
访问新版 (opens new window)
  • API接口

    • BaseAPI
    • ToolAPI
    • UiAPI
    • SceneAPI
    • ElementAPI
    • MarkAPI
    • MapAPI
    • ModelAPI
      • EventAPI
      • CameraAPI
      • ScriptAPI
      • GeometryAPI
    目录

    ModelAPI

    模型相关接口。

    # 接口

    接口 说明
    getAllModels 获取模型文件中的所有model。
    getAllCategories 获取模型文件中的所有的图层。
    getDisplayedExtent 获取模型显示包围盒。
    expandDisplayedExtents 扩展显示包围盒。
    showCategoriesByNames 通过图层名设置图层为显示。
    hideCategoriesByNames 通过图层名设置图层为隐藏。
    showCategoriesByIds 通过图层ID设置图层为显示。
    hideCategoriesByIds 通过图层ID设置图层为隐藏。
    showModelsByNames 通过模型名设置模型为显示。
    hideModelsByNames 通过模型名设置模型为隐藏。
    showModelsByIds 通过模型ID设置模型为显示。
    hideModelsByIds 通过模型ID设置模型为隐藏。
    getAllElementIds 获取模型所有elemnt的ID的数组。

    # 1. getAllModels

    获取模型文件中的所有的model。

    getAllModels()

    返回:

    通过消息 onBWApiMessage/ModelApi/onGetAllModels 返回数据。

    # 2. getAllCategories

    获取模型文件中的所有的图层。

    getAllCategories()

    返回:

    通过消息 onBWApiMessage/ModelApi/onGetAllCategories 返回数据。

    # 3. getDisplayedExtent

    获取当前模型对应的显示包围盒。

    getDisplayedExtent()

    返回:

    通过消息 onBWApiMessage/ModelApi/onGetDisplayedExtent返回数据。

    # 4. expandDisplayedExtents

    扩展显示包围盒,按输入的包围盒,对现有的显示包围盒进行扩展,是的包围盒包含输入的包围盒。通常用于在添加新的场景要素的时候,通过该接口确保显示范围能包含新添加的要素。

    expandDisplayedExtents(xMin, xMax, yMin, yMax, zMin, zMax)

    参数:

    xMin/xMax/yMin/yMax/zMin/zMax 要扩张的范围的最大最小值。

    # 5. showCategoriesByNames

    通过图层名设置图层为显示。

    showCategoriesByNames(names, includeSub = true )

    参数:

    names 图层名的数组。

    includeSub 是否包含下级,默认为 true。

    # 6. hideCategoriesByNames

    通过图层名设置图层为隐藏。

    hideCategoriesByNames(names, includeSub = true )

    参数:

    names 图层名的数组。

    includeSub 是否包含下级,默认为 true。

    # 7. showCategoriesByIds

    通过图层ID设置图层为显示。

    showCategoriesByIds(ids, includeSub = true )

    参数:

    ids 图层ID的数组。

    includeSub 是否包含下级,默认为 true。

    # 8. hideCategoriesByIds

    通过图层ID设置图层为隐藏。

    hideCategoriesByIds(ids, includeSub = true )

    参数:

    ids 图层ID的数组。

    includeSub 是否包含下级,默认为 true

    # 9. showModelsByNames

    通过模型名设置模型为显示。

    showModelsByNames(names, includeSub = true )

    参数:

    names 模型名的数组。

    includeSub 是否包含下级,默认为 true。

    # 10. hideModelsByNames

    通过模型名设置模型为隐藏。

    hideModelsByNames(names, includeSub = true )

    参数:

    names 模型名的数组。

    includeSub 是否包含下级,默认为 true。

    # 11. showModelsByIds

    通过模型ID设置模型为显示。

    showModelsByIds(ids, includeSub = true )

    参数:

    ids 模型ID的数组。

    includeSub 是否包含下级,默认为 true。

    # 12. hideModelsByIds

    通过模型ID设置模型为隐藏。

    hideModelsByIds(ids, includeSub = true )

    参数:

    ids 模型ID的数组。

    includeSub 是否包含下级,默认为 true。

    # 13. getAllElementIds

    获取模型所有elemnt的ID的数组。

    getAllElementIds()

    返回:

    通过消息 onBWApiMessage/ModelApi/onGetAllElementIds返回数据。

    MapAPI
    EventAPI

    ← MapAPI EventAPI→

    Theme by Vdoing | Copyright © 1999-2024 | 北京跨世纪软件技术有限公司 | 京ICP备2020036512号-1
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式