registered

Register an account on the official website to obtain a Token.

Use the CDN

<! DOCTYPEhtml>
<html lang="en">
<head>
  <meta charset="utf-8">
  <script src="https://cesium.com/downloads/cesiumjs/releases/1.80/Build/Cesium/Cesium.js"></script>
  <link href="https://cesium.com/downloads/cesiumjs/releases/1.80/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
</head>
<body>
  <div id="map"></div>
  <script>
  
    Cesium.Ion.defaultAccessToken = 'your_access_token';

    const viewer = new Cesium.Viewer('map', {
      terrainProvider: Cesium.createWorldTerrain()
    });    
    
    const buildingTileset = viewer.scene.primitives.add(Cesium.createOsmBuildings());   
    
    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>
Copy the code