From f0f1d3453e3c8f2f80de4b3c17d7c61fe3b3c0ce Mon Sep 17 00:00:00 2001
From: Rushikesh Padsala <rushikesh.padsala@hft-stuttgart.de>
Date: Wed, 18 Nov 2020 11:07:18 +0000
Subject: [PATCH] changed default basemap and camera view App.js

---
 public/Source/App.js | 34 +++++++++++++++++++++++++---------
 1 file changed, 25 insertions(+), 9 deletions(-)

diff --git a/public/Source/App.js b/public/Source/App.js
index 0b75567..045ce02 100644
--- a/public/Source/App.js
+++ b/public/Source/App.js
@@ -11,13 +11,16 @@
 		 animation: false,
 		 shadow: false,
 		 // // Set default basemap
-		 imageryProvider : new Cesium.MapboxImageryProvider({
-                           mapId: 'mapbox.streets'
+		 imageryProvider : new Cesium.BingMapsImageryProvider({
+                           url : 'https://dev.virtualearth.net',
+						   key : 'ArfoC16LZfs9KzyU-OJyXSqVI6a9-Swv-cq7oO6e2bWYqZOS8M77coukVzeYDyLA',
+						   mapStyle : Cesium.BingMapsStyle.AERIAL
                            }),
 		 baseLayerPicker: true
 		 
      });
      viewer.clock.shouldAnimate = false;
+     viewer.scene.globe.enableLighting = false;
      viewer.clock.startTime = Cesium.JulianDate.fromIso8601("2019-09-20T13:00:00Z");
      viewer.clock.stopTime = Cesium.JulianDate.fromIso8601("2019-09-20T13:20:00Z");
      viewer.clock.currentTime = Cesium.JulianDate.fromIso8601("2019-09-20T13:00:00Z");
@@ -27,23 +30,36 @@
     // Configuring the camera
     //////////////////////////////////////////////////////////////////////////
     // // Create an initial camera view
-     var initialPosition = Cesium.Rectangle.fromDegrees(-73.9907, 40.6776, -73.9856, 40.6809);
-     //var initialOrientation = new Cesium.HeadingPitchRoll.fromDegrees(1.0820674827650922, -0.6183562882750495, 0.003599879447971688);
+   var initialPosition = Cesium.Cartesian3.fromDegrees(-73.993092, 40.655215, 600);
+     var initialOrientation = new Cesium.HeadingPitchRoll.fromDegrees(354, -20, 0);
      var homeCameraView = {
-         destination : initialPosition
-         //orientation : initialOrientation,
-		 //endTransform: Cesium.Matrix4.IDENTITY
+         destination : initialPosition,
+         orientation : {
+            heading : initialOrientation.heading,
+            pitch : initialOrientation.pitch,
+            roll : initialOrientation.roll
+         }
       };
     // // Set the initial view
      viewer.scene.camera.setView(homeCameraView);
-	 console.log (Cesium.Rectangle.fromDegrees);
 	// set home button to initial view 
 	 
 	 viewer.homeButton.viewModel.command.beforeExecute.addEventListener(function (e) {
         e.cancel = true;
          viewer.scene.camera.flyTo(homeCameraView);
      });
-	console.log (viewer.scene.camera);
+	viewer.camera.changed.addEventListener(function() {
+
+  var deg = Math.round( Cesium.Math.toDegrees(viewer.camera.heading))
+  console.log('Heading:', deg)
+
+  var deg = Math.round( Cesium.Math.toDegrees(viewer.camera.pitch))
+  console.log('Pitch:', deg)
+  
+  var deg = Math.round( Cesium.Math.toDegrees(viewer.camera.roll))
+  console.log('Roll:', deg)
+  
+});
     //////////////////////////////////////////////////////////////////////////
     // Loading GeoJSON with polygon outline - strokewidth is an issue with windows
     //////////////////////////////////////////////////////////////////////////
-- 
GitLab