An I3SDataProvider is the main public class for I3S support. The url option
should return a scene object. Currently supported I3S versions are 1.6 and
1.7/1.8 (OGC I3S 1.2). I3SFeature and I3SNode classes implement the
Object Model for I3S entities, with public interfaces.
This object is normally not instantiated directly, use
I3SDataProvider.fromUrl
.
参数名称 | 类型 | 描述信息 |
---|---|---|
options |
I3SDataProvider.ConstructorOptions | An object describing initialization options |
使用示例s:
try {
const i3sData = await I3SDataProvider.fromUrl(
"https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/Frankfurt2017_vi3s_18/SceneServer/layers/0"
);
viewer.scene.primitives.add(i3sData);
} catch (error) {
console.log(`There was an error creating the I3S Data Provider: ${error}`);
}
try {
const geoidService = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl(
"https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/EGM2008/ImageServer"
);
const i3sData = await I3SDataProvider.fromUrl(
"https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/Frankfurt2017_vi3s_18/SceneServer/layers/0", {
geoidTiledTerrainProvider: geoidService
});
viewer.scene.primitives.add(i3sData);
} catch (error) {
console.log(`There was an error creating the I3S Data Provider: ${error}`);
}
参考:
成员(属性)
Determines if the alpha mode of the material will be adjusted depending on the color vertex attribute.
Determines if the I3S symbology will be parsed and applied for the layers.
Determines if the flat normals will be generated for I3S geometry without normals.
Gets the I3S data for this object.
readonly extent : Rectangle
Gets the extent covered by this I3S.
readonly geoidTiledTerrainProvider : ArcGISTiledElevationTerrainProvider
The terrain provider referencing the GEOID service to be used for orthometric to ellipsoidal conversion.
readonly layers : Array.<I3SLayer>
Gets the collection of layers.
Gets a human-readable name for this dataset.
readonly resource : Resource
The resource used to fetch the I3S dataset.
Determines if the dataset will be shown.
Determines if the features will be shown.
readonly sublayers : Array.<I3SSublayer>
Gets the collection of building sublayers.
方法
static Cesium.I3SDataProvider.fromUrl(url, options) → Promise.<I3SDataProvider>
Creates an I3SDataProvider. Currently supported I3S versions are 1.6 and
1.7/1.8 (OGC I3S 1.2).
参数名称 | 类型 | 描述信息 |
---|---|---|
url |
string | Resource | The url of the I3S dataset, which should return an I3S scene object |
options |
I3SDataProvider.ConstructorOptions | An object describing initialization options |
返回值:
使用示例s:
try {
const i3sData = await I3SDataProvider.fromUrl(
"https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/Frankfurt2017_vi3s_18/SceneServer/layers/0"
);
viewer.scene.primitives.add(i3sData);
} catch (error) {
console.log(`There was an error creating the I3S Data Provider: ${error}`);
}
try {
const geoidService = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl(
"https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/EGM2008/ImageServer"
);
const i3sData = await I3SDataProvider.fromUrl(
"https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/Frankfurt2017_vi3s_18/SceneServer/layers/0", {
geoidTiledTerrainProvider: geoidService
});
viewer.scene.primitives.add(i3sData);
} catch (error) {
console.log(`There was an error creating the I3S Data Provider: ${error}`);
}
Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
release of WebGL resources, instead of relying on the garbage collector to destroy this object.
Once an object is destroyed, it should not be used; calling any function other than
isDestroyed
will result in a DeveloperError
exception. Therefore,
assign the return value (undefined
) to the object as done in the example.
Throws:
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
Filters the drawn elements of a scene to specific attribute names and values
参数名称 | 类型 | 默认值 | 描述信息 |
---|---|---|---|
filters |
Array.<I3SNode.AttributeFilter> |
[]
|
可选 The collection of attribute filters |
返回值:
A promise that is resolved when the filter is applied
Returns the collection of names for all available attributes
返回值:
The collection of attribute names
Returns the collection of values for the attribute with the given name
参数名称 | 类型 | 描述信息 |
---|---|---|
name |
string | The attribute name |
返回值:
The collection of attribute values
Returns true if this object was destroyed; otherwise, false.
If this object was destroyed, it should not be used; calling any function other than
isDestroyed
will result in a DeveloperError
exception.
返回值:
true
if this object was destroyed; otherwise, false
.
定义的类型
Initialization options for the I3SDataProvider constructor
属性:
属性名称 | 类型 | 可选 | 默认值 | 描述信息 |
---|---|---|---|---|
name |
string |
<可选> |
The name of the I3S dataset. | |
show |
boolean |
<可选> |
true | Determines if the dataset will be shown. |
geoidTiledTerrainProvider |
ArcGISTiledElevationTerrainProvider | Promise.<ArcGISTiledElevationTerrainProvider> |
<可选> |
Tiled elevation provider describing an Earth Gravitational Model. If defined, geometry will be shifted based on the offsets given by this provider. Required to position I3S data sets with gravity-related height at the correct location. | |
cesium3dTilesetOptions |
Cesium3DTileset.ConstructorOptions |
<可选> |
Object containing options to pass to an internally created Cesium3DTileset . See Cesium3DTileset for list of valid properties. All options can be used with the exception of url and show which are overridden by values from I3SDataProvider. |
|
showFeatures |
boolean |
<可选> |
false | Determines if the features will be shown. |
adjustMaterialAlphaMode |
boolean |
<可选> |
false | The option to adjust the alpha mode of the material based on the transparency of the vertex color. When true , the alpha mode of the material (if not defined) will be set to BLEND for geometry with any transparency in the color vertex attribute. |
applySymbology |
boolean |
<可选> |
false | Determines if the I3S symbology will be parsed and applied for the layers. |
calculateNormals |
boolean |
<可选> |
false | Determines if the flat normals will be generated for I3S geometry without normals. |
使用示例s:
// Increase LOD by reducing SSE
const cesium3dTilesetOptions = {
maximumScreenSpaceError: 1,
};
const i3sOptions = {
cesium3dTilesetOptions: cesium3dTilesetOptions,
};
// Set a custom outline color to replace the color defined in I3S symbology
const cesium3dTilesetOptions = {
outlineColor: Cesium.Color.BLUE,
};
const i3sOptions = {
cesium3dTilesetOptions: cesium3dTilesetOptions,
applySymbology: true,
};