Created
April 20, 2020 17:28
-
-
Save JoeThunyathep/afff8e1379d94357a7d113974d038cff to your computer and use it in GitHub Desktop.
Index file for Cesium NYC application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://cesium.com/downloads/cesiumjs/releases/1.68/Build/Cesium/Cesium.js"></script> | |
<link href="https://cesium.com/downloads/cesiumjs/releases/1.68/Build/Cesium/Widgets/widgets.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div id="cesiumContainer" style="width: 100%; height:100%"></div> | |
<script> | |
var viewer = new Cesium.Viewer('cesiumContainer'); | |
var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ | |
url: "<link to your 3D Tile dataset (tileset.json)>", | |
})) | |
Cesium.when(tileset.readyPromise).then(function (tileset) {viewer.flyTo(tileset)}) // fly to 3D tiles after loading! | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Many thanks, man!