You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.4 KiB
HTML
33 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title></title>
|
|
<script src="https://cesium.com/downloads/cesiumjs/releases/1.119/Build/Cesium/Cesium.js"></script>
|
|
<link href="https://cesium.com/downloads/cesiumjs/releases/1.119/Build/Cesium/Widgets/widgets.css"
|
|
rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
<div id="cesiumContainer"></div>
|
|
<script type="module">
|
|
// Your access token can be found at: https://ion.cesium.com/tokens.
|
|
// Replace `your_access_token` with your Cesium ion access token.
|
|
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI4YjJhMDI5MC0zZTI1LTQ4OTgtYWUzYi1mMThmMzE3NWVkNWQiLCJpZCI6MjI5ODY2LCJpYXQiOjE3MjE2MzI4MjZ9.Bn-EkViB8xQCaq5aO2Kgg-UF0bqrrwBs6B9idWmc3Mc';
|
|
// Initialize the Cesium Viewer in the HTML element with the `cesiumContainer` ID.
|
|
const viewer = new Cesium.Viewer('cesiumContainer', {
|
|
terrain: Cesium.Terrain.fromWorldTerrain(),
|
|
});
|
|
// Fly the camera to San Francisco at the given longitude, latitude, and height.
|
|
viewer.camera.flyTo({
|
|
destination: Cesium.Cartesian3.fromDegrees( 116.407001,39.904599, 400),
|
|
orientation: {
|
|
heading: Cesium.Math.toRadians(0.0),
|
|
pitch: Cesium.Math.toRadians(-15.0),
|
|
} ,
|
|
});
|
|
// Add Cesium OSM Buildings, a global 3D buildings layer.
|
|
const buildingTileset = await Cesium.createOsmBuildingsAsync();
|
|
viewer.scene.primitives.add(buildingTileset);
|
|
</script>
|
|
</body>
|
|
</html> |