<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- Include the CesiumJS JavaScript and CSS files -->
<script src="https://cesium.com/downloads/cesiumjs/releases/1.79.1/Build/Cesium/Cesium.js"></script>
<link href="https://cesium.com/downloads/cesiumjs/releases/1.79.1/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
</head>
<body>
<div id="cesiumContainer"></div>
<script>
// Your access token can be found at: https://cesium.com/ion/tokens.
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmNWEzMWUwNS1mNDEzLTQ3ZjctOWMzNS1kYTQzOWZjNDBiMGYiLCJpZCI6NDcxNDksImlhdCI6MTYxNjk4MjIyM30.jFC5i3Jrmd710B_soZTocY5JEQPnrhVGNB3vXtXCtU4';
// Initialize the Cesium Viewer in the HTML element with the `cesiumContainer` ID.
const viewer = new Cesium.Viewer('cesiumContainer', {
terrainProvider: Cesium.createWorldTerrain()
});
// Add Cesium OSM Buildings, a global 3D buildings layer.
const buildingTileset = viewer.scene.primitives.add(Cesium.createOsmBuildings());
// Fly the camera to San Francisco at the given longitude, latitude, and height.
viewer.camera.flyTo({
destination : Cesium.Cartesian3.fromDegrees(-122.4175, 37.655, 400),
orientation : {
heading : Cesium.Math.toRadians(0.0),
pitch : Cesium.Math.toRadians(-15.0),
}
});
</script>
</div>
</body>
</html>
중간에 자세히 보시면 Cesium.Ion.defaultAccessToken이라는 변수가 있습니다. 이게 뭐냐면 말그대로 토큰입니다. 구글 맵에서 api키라고 생각하시면 됩니다. (겍.. 유료화?!) 어쨋든 토큰을 발급하는 URL을 전달드리니 참고바랍니다 ^ ^;