Loading Mesh Layers in Cesium Clients

To load your mesh layer in a Cesium client using Cesium API:

1.      Add a Cesium3DTileset element:

var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({

url : "https://www.skylineglobe.com/SG/b3dm/1726297/tileset.json"

}));

2.      Use the following path format for the layer to load:

https://[ServerName]/sg/b3dm/[LayerID]/tileset.json

E.g., https://www.skylineglobe.com/SG/b3dm/1726297/tileset.json

Example:

var viewer = new Cesium.Viewer("cesiumContainer");

var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({

url: "https://www.skylineglobe.com/SG/b3dm/1726297/tileset.json"

}));

tileset.readyPromise.then(function(tileset) {

viewer.camera.flyToBoundingSphere( tileset.boundingSphere);

});

Note:   You can also interactively browse, edit and run this code example in Cesium Sandcastle.

3.      You can set the OGC 3D Tiles version in which to expose the mesh layer, by appending the 3D Tiles version (b3dmversion) query parameter to the end of your 3D Tile URL. Leave the parameter value empty to use the latest version. Use the following format:

b3dmversion=[version #]

E.g., https://www.skylineglobe.com/SG/b3dm/1726297/tileset.json?b3dmversion=V0.2

Note:       If a b3dmversion query parameter is not appended to the URL, the 3D Tiles version is determined by the Default 3D Tiles Version setting on the Settings page. SeeSetting SkylineGlobe Server Settings” in the “SkylineGlobe Server Settings” chapter for more information.

4.      If you want to define how to handle the 3DML’s elevation values, append the vertical datum (vdatum) parameter to the end of your 3D Tile URL. The vdatum parameter can have either of the following values:

§  convert_z: Reproject to ellipsoid (as required by the OGC 3D Tiles standard) for compatibility with terrain that uses true ellipsoid elevation.

§  copy_z: Maintain elevation values as geoid, while declaring them as ellipsoid.

Note:       Most input coordinate systems and terrain data, including MPT, use geoid elevation values even though they are declared as ellipsoid when delivered to TE4W/Cesium, and thus they are actually compatible without reprojection.

Use the following format:

?vdatum=[reprojection value: either copy_z. OR convert_z]

E.g., https://www.skylineglobe.com/SG/b3dm/1726297/tileset.json?b3dmversion=V0.2&vdatum=copy_z