|
<!DOCTYPE html> |
|
<html lang="en"> |
|
<head> |
|
<meta charset="utf-8"> |
|
|
|
<script src="https://cesium.com/downloads/cesiumjs/releases/1.88/Build/Cesium/Cesium.js"></script> |
|
<link href="https://cesium.com/downloads/cesiumjs/releases/1.88/Build/Cesium/Widgets/widgets.css" rel="stylesheet"> |
|
</head> |
|
<body> |
|
<div id="cesiumContainer"></div> |
|
<script> |
|
|
|
|
|
|
|
Cesium.Ion.defaultAccessToken = 'your_access_token'; |
|
|
|
|
|
const viewer = new Cesium.Viewer('cesiumContainer', { |
|
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> |
|
|