mirror of https://github.com/CesiumGS/cesium.git
70 lines
2.2 KiB
HTML
70 lines
2.2 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta
|
|
name="viewport"
|
|
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
|
|
/>
|
|
<meta name="description" content="Global imagery data from Google Maps." />
|
|
<meta name="cesium-sandcastle-labels" content="Beginner, Showcases" />
|
|
<title>Cesium Demo</title>
|
|
<script type="text/javascript" src="../Sandcastle-header.js"></script>
|
|
<script type="module" src="../load-cesium-es6.js"></script>
|
|
</head>
|
|
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
|
|
<style>
|
|
@import url(../templates/bucket.css);
|
|
</style>
|
|
<div id="cesiumContainer" class="fullSize"></div>
|
|
<div id="loadingOverlay"><h1>Loading...</h1></div>
|
|
<div id="toolbar"></div>
|
|
<script id="cesium_sandcastle_script">
|
|
window.startup = async function (Cesium) {
|
|
"use strict";
|
|
//Sandcastle_Begin
|
|
const assetId = 3830184;
|
|
|
|
const google = Cesium.ImageryLayer.fromProviderAsync(
|
|
Cesium.IonImageryProvider.fromAssetId(assetId),
|
|
);
|
|
|
|
const viewer = new Cesium.Viewer("cesiumContainer", {
|
|
animation: false,
|
|
baseLayer: false,
|
|
baseLayerPicker: false,
|
|
geocoder: Cesium.IonGeocodeProviderType.GOOGLE,
|
|
timeline: false,
|
|
sceneModePicker: false,
|
|
navigationHelpButton: false,
|
|
homeButton: false,
|
|
terrainProvider: await Cesium.CesiumTerrainProvider.fromIonAssetId(1),
|
|
});
|
|
viewer.geocoder.viewModel.keepExpanded = true;
|
|
|
|
viewer.imageryLayers.add(google);
|
|
|
|
viewer.scene.camera.flyTo({
|
|
duration: 0,
|
|
destination: new Cesium.Rectangle.fromDegrees(
|
|
//Philly
|
|
-75.280266,
|
|
39.867004,
|
|
-74.955763,
|
|
40.137992,
|
|
),
|
|
}); //Sandcastle_End
|
|
Sandcastle.finishedLoading();
|
|
};
|
|
if (typeof Cesium !== "undefined") {
|
|
window.startupCalled = true;
|
|
window.startup(Cesium).catch((error) => {
|
|
"use strict";
|
|
console.error(error);
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|