Changed around line 1
+ // Initialize Cesium Viewer
+ const viewer = new Cesium.Viewer('cesiumContainer', {
+ terrainProvider: Cesium.createWorldTerrain()
+ });
+
+ // Set initial view
+ viewer.camera.setView({
+ destination: Cesium.Cartesian3.fromDegrees(0, 0, 10000000)
+ });
+
+ // Add event listeners for controls
+ document.getElementById('resetView').addEventListener('click', () => {
+ viewer.camera.setView({
+ destination: Cesium.Cartesian3.fromDegrees(0, 0, 10000000)
+ });
+ });
+
+ document.getElementById('flyToParis').addEventListener('click', () => {
+ viewer.camera.flyTo({
+ destination: Cesium.Cartesian3.fromDegrees(2.3522, 48.8566, 2000)
+ });
+ });
+
+ document.getElementById('flyToNewYork').addEventListener('click', () => {
+ viewer.camera.flyTo({
+ destination: Cesium.Cartesian3.fromDegrees(-74.006, 40.7128, 2000)
+ });
+ });
+
+ // Add basic lighting
+ viewer.scene.globe.enableLighting = true;
+
+ // Add imagery layer
+ viewer.imageryLayers.addImageryProvider(
+ new Cesium.IonImageryProvider({ assetId: 3812 })
+ );
+
+ // Add terrain
+ viewer.terrainProvider = Cesium.createWorldTerrain();