ITwinData

将 iTwin 平台数据加载到 CesiumJS 的方法
Experimental

此功能不是最终的,在没有 Cesium 的标准弃用政策的情况下可能会发生变化。

See:

Methods

static Cesium.ITwinData.createDataSourceForRealityDataId(iTwinId, realityDataId, type, rootDocument)Promise.<(GeoJsonDataSource|KmlDataSource)>

为指定的实况数据 ID 创建正确类型的数据源。 此功能仅适用于 KML 和 GeoJSON 类型的数据。 如果未提供 typerootDocument 此函数 将首先请求指定实况数据的完整元数据以填充这些值。
Name Type Description
iTwinId string 要从中加载数据的 iTwin 的 ID
realityDataId string 要加载的实景数据的 ID
type ITwinPlatform.RealityDataType optional 此现实数据类型
rootDocument string optional 此现实数据的根文档的路径
Returns:
Throws:

static Cesium.ITwinData.createTilesetForRealityDataId(iTwinId, realityDataId, type, rootDocument)Promise.<Cesium3DTileset>

为指定的现实数据 ID 创建瓦片集。此功能仅有效 使用 3D 瓦片网格和点云。 如果未提供 typerootDocument 此函数 将首先请求指定实况数据的完整元数据以填充这些值。
Name Type Description
iTwinId string 要从中加载数据的 iTwin 的 ID
realityDataId string 要加载的实景数据的 ID
type ITwinPlatform.RealityDataType optional 此现实数据类型
rootDocument string optional 此现实数据的根文档的路径
Returns:
Throws:
Experimental

此功能不是最终功能,在没有 Cesium 的标准弃用政策的情况下可能会发生变化。

static Cesium.ITwinData.createTilesetFromIModelId(iModelId, options)Promise.<(Cesium3DTileset|undefined)>

使用 iTwin 的网格导出 API 为给定的 iModel ID 创建一个 Cesium3DTileset。 如果给定的 iModel ID 没有可用的已完成导出,则返回的 Promise 将解析为 undefined。 我们建议等待 10-20 秒,然后再次尝试加载图块集。 如果所有导出都无效,这将引发错误。
Name Type Description
iModelId string 要加载的 iModel 的 ID
options Cesium3DTileset.ConstructorOptions optional 包含要传递给内部创建的 Cesium3DTileset 的选项的对象。
Returns:
一个 Promise,它将解析为创建的 3D 图块集,如果给定 iModel ID 没有完成导出,则为 undefined
Throws:
Example:
const tileset = await Cesium.ITwinData.createTilesetFromIModelId(iModelId);
if (Cesium.defined(tileset)) {
  viewer.scene.primitives.add(tileset);
}
Experimental

此功能不是最终的,在没有 Cesium 的标准弃用政策的情况下可能会发生变化。

static Cesium.ITwinData.loadGeospatialFeatures(iTwinId, collectionId, limit)Promise.<GeoJsonDataSource>

将地理空间特征 API 中的数据加载为 GeoJSON。
Name Type Default Description
iTwinId string 要从中加载数据的 iTwin 的 ID
collectionId string 要加载的数据收集的 ID
limit number 10000 optional 每页的项目数,必须介于 1 到 10,000 之间(包括 1 到 10,000 个)
Returns:
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.