Hey,
Ive seen people having same issue. Tileset doesnt appear by manualy going to it or it crashes during viewer.zoomTo, my code:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Use correct character set. -->
<meta charset="utf-8">
<!-- Tell IE to use the latest, best version. -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Make the application on mobile take up the full browser screen and disable user scaling. -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>Newcesiumtest</title>
<script src="/RS/Build/Cesium/Cesium.js"></script>
<style>
@import url(/RS/Build/Cesium/Widgets/widgets.css);
html, body, #cesiumContainer {
width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
}
#measuretoolbar {
position: absolute;
top : 50%;
right: 30px;
display: inline;
margin: 10px;
padding: 0px;
background: #394148;
}
</style>
</head>
[details="Summary"]
[/details]
<body>
<style>@import url(/RS/Apps/Sandcastle/templates/bucket.css);</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay">
<h1>Loading...</h1>
</div>
<div id="toolbar"></div>
<script>
Cesium.Ion.defaultAccessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI0ZDhmZDlhYy0zOWIwLTQ5N2EtODEyYy00ODY1MzFkYzQwODUiLCJpZCI6MTg0MDMsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NzM3NTU0OTN9.vQn17q1cp77RAXXIjxv-IbfOkaiA2mP-QF8lmHo0XFk";
const viewer = new Cesium.Viewer("cesiumContainer", {
});
viewer.scene.globe.depthTestAgainstTerrain = true;
try {
const tileset = viewer.scene.primitives.add(
new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(2526103),
skipLevelOfDetail : false,
maximumScreenSpaceError:1,
maximumNumberOfLoadedTiles :2000
})
);
viewer.scene.primitives.add(tileset);
// viewer.zoomTo(tileset);
// Apply the default style if it exists
const extras = tileset.asset.extras;
if (
Cesium.defined(extras) &&
Cesium.defined(extras.ion) &&
Cesium.defined(extras.ion.defaultStyle)
) {
tileset.style = new Cesium.Cesium3DTileStyle(extras.ion.defaultStyle);
}
} catch (error) {
console.log(error);
}
</script>
</body'
</html>
is it because there is no terrain and height offset doesnt work? Happens only in this new Cesium, older I have doesnt have any problem.
Thanks