Skip to content

Instantly share code, notes, and snippets.

@bertt

bertt/cesium_terrains

Last active Nov 29, 2018
Embed
What would you like to do?
Cesium + custom terrains
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1OGUyODEwNC03YTIzLTRjMmItOTk4Ni1iZWNkNGE1MWZhMTkiLCJpZCI6NTQzLCJpYXQiOjE1MjUyNzM4OTd9.F2r6H2XRAcnkHjkFgXAzDieW6TeIxDhTZ5hdikd-_Q8';
var viewer = new Cesium.Viewer('cesiumContainer', {
terrainExaggeration : 10.0
});
var terrainProvider = new Cesium.CesiumTerrainProvider({
url : '/tilesets/tiles'
});
viewer.scene.terrainProvider = terrainProvider;
// zoom to texel...
viewer.camera.setView({
destination : new Cesium.Cartesian3.fromDegrees(4.7128563,53.051284, 500),
orientation: {
heading : Cesium.Math.toRadians(30),
pitch : Cesium.Math.toRadians(-20),
roll : 0.0
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment