From af3537dcff549431efe653359f1b34c86b77432e Mon Sep 17 00:00:00 2001
From: fuchengshen <men883234@gmail.com>
Date: 星期三, 19 十月 2022 16:59:02 +0800
Subject: [PATCH] 上海遮罩层更改

---
 js/changable_params.js              |    4 +
 widgetsTS/taxiRouteReplay/widget.js |  130 +++++++++++++++++++++++++++++--------------
 js/index.js                         |    3 +
 3 files changed, 95 insertions(+), 42 deletions(-)

diff --git a/js/changable_params.js b/js/changable_params.js
index d8c9164..fef24ef 100644
--- a/js/changable_params.js
+++ b/js/changable_params.js
@@ -53,7 +53,11 @@
 }
 var tiandituArr = ['51915011aa0997aa2ddd7e38504fa8bc', '51915011aa0997aa2ddd7e38504fa8bc']
 // http://112.74.77.127:8090/  http://223.167.111.168:7002/
+<<<<<<< HEAD
 var default_system_params = { geoserver_url_predix: 'http://223.167.111.168:7001/', nodejs_url_predix: 'http://223.167.111.168:7002/', userid: 2, queryDataType: 'hour', weathercitycode: '101020100', wind360: 0, windSpeed: 10, is_single_taxi_replaying: false,summary_topN_count :50, un_authorization_url: 'http://223.167.111.168:8016/PollutionData/loginpage.aspx?returnurl=http://223.167.111.168:8004/shanghai/index.html',regionCode:3};
+=======
+var default_system_params = { geoserver_url_predix: 'http://223.167.111.168:7001/', nodejs_url_predix: 'http://223.167.111.168:7002/', userid: 2, queryDataType: 'hour', weathercitycode: '101020100', wind360: 0, windSpeed: 10, is_single_taxi_replaying: false,summary_topN_count :50, un_authorization_url: 'http://223.167.111.168:8016/PollutionData/loginpage.aspx?returnurl=http://223.167.111.168:8004/shanghai/index.html',regionCode:0};
+>>>>>>> 6c1b125337b8a53e57151f36661ded58daf4d534
 var default_grid_camerview = {grid5000:{"lat":30.367931,"lng":121.518409,"alt":128482,"heading":2,"pitch":-57},grid3000:{"lat":30.902475,"lng":121.487751,"alt":38716,"heading":2,"pitch":-57},grid1000:{"lat":31.066346,"lng":121.462529,"alt":10026,"heading":2,"pitch":-57},grid500:{"lat":31.112561,"lng":121.458433,"alt":2483,"heading":2,"pitch":-57}};
 
 function bindPopupFunction(event) {
diff --git a/js/index.js b/js/index.js
index 9a9c7e8..ce22fcb 100644
--- a/js/index.js
+++ b/js/index.js
@@ -103,9 +103,12 @@
   //鍒涘缓涓夌淮鍦扮悆鍦烘櫙
   map = new mars3d.Map("mars3dContainer", mapOptions);
 
+<<<<<<< HEAD
   //涓婃捣杈圭晫閬僵
 
 
+=======
+>>>>>>> 6c1b125337b8a53e57151f36661ded58daf4d534
   //鏋勯�爓idget
   initWidget(map);
 
diff --git a/widgetsTS/taxiRouteReplay/widget.js b/widgetsTS/taxiRouteReplay/widget.js
index 300d329..7e527a2 100644
--- a/widgetsTS/taxiRouteReplay/widget.js
+++ b/widgetsTS/taxiRouteReplay/widget.js
@@ -11,11 +11,11 @@
         },
       };
     }
-
+ 
     reloadData(new_taxi_sn) {
       this.viewWindow.resetStartQueryTaxiDataText(new_taxi_sn);
       this.taxi_sn = new_taxi_sn;
-
+ 
       if (this.startGraphic) {
         this.startGraphic.remove();
         this.startGraphic = null;
@@ -26,14 +26,14 @@
       }
       this.routeLayer.clear();
     }
-
+ 
     clearReplayLayers() {
       this.pointLayer.clear();
       this.routeLayer.clear();
     }
-
+ 
     addTaxiReplayGraphic(points) {
-
+ 
       this.startGraphic = new mars3d.graphic.BillboardEntity({
         position: points[0],
         style: {
@@ -45,7 +45,7 @@
         },
       });
       this.pointLayer.addGraphic(this.startGraphic);
-
+ 
       this.endGraphic = new mars3d.graphic.BillboardEntity({
         position: points[points.length - 1],
         style: {
@@ -58,33 +58,56 @@
       });
       this.pointLayer.addGraphic(this.endGraphic);
 
-      var Pointsdata = mars3d.global_variables.singleTaxiReplayData
-        for (var i = 0, len = Pointsdata.length; i < len; i++) {
-          var item = Pointsdata[i];
-          var lng = Number(item["lon"]); //缁忓害
-          var lat = Number(item["lat"]); //绾害
-          var position = null;
-          if (lng && lat) {
-            position = Cesium.Cartesian3.fromDegrees(lng, lat);
-          }
-          item = changeNullAndundefinedToEmpty(item)
+
+
+      let Pointsdata = mars3d.global_variables.singleTaxiReplayData
+      for (var i = 0, len = Pointsdata.length; i < len-1; i++) {
+        var item = Pointsdata[i];
+        var item2 = Pointsdata[i+1];
+        var lng = Number(item["lon"]); //缁忓害
+        var lat = Number(item["lat"]); //绾害
+        var lng2 = Number(item2["lon"]); //缁忓害
+        var lat2 = Number(item2["lat"]); //绾害
+        var position = null;
+        var position2 = null;
+        if (lng && lat&&lng2&&lat2) {
+          position = Cesium.Cartesian3.fromDegrees(lng, lat);
+          position2 = Cesium.Cartesian3.fromDegrees(lng2, lat2);
+        }
+        item = changeNullAndundefinedToEmpty(item)
       let graphic = new mars3d.graphic.PolylineEntity({
-        positions: points,
+        positions: [position,position2],
         style: {
           width: 10,
           material: new mars3d.material.LineFlowMaterialProperty({
             color:this.viewWindow.getLayerPointColorByQindexandValue(1004,this.qindex, item[this.qindex]),
             image: "./img/textures/arrow2.png",
-            repeat: new Cesium.Cartesian2(30, 1),
-            speed: 30, //閫熷害锛屽缓璁彇鍊艰寖鍥�1-100
+            repeat: new Cesium.Cartesian2(1, 1),
+            speed: 40, //閫熷害锛屽缓璁彇鍊艰寖鍥�1-100
           })
         },
       });
       this.routeLayer.addGraphic(graphic);
+      }
+      // console.log(items,"items")
+      // let graphic = new mars3d.graphic.PolylineEntity({
+      //   positions: points,
+      //   style: {
+      //     width: 10,
+      //     material: new mars3d.material.LineFlowMaterialProperty({
+      //       color: Cesium.Color.AQUA,
+      //       image: "./img/textures/arrow2.png",
+      //       repeat: new Cesium.Cartesian2(50, 1),
+      //       speed: 40, //閫熷害锛屽缓璁彇鍊艰寖鍥�1-100
+      //     })
+      //   },
+      // });
+      // this.routeLayer.addGraphic(graphic);
       this.routeLayer.flyTo();
-    }}
-
+    }
+ 
     addTaxiPointInfoGraphic() {
+<<<<<<< HEAD
         var Pointsdata = mars3d.global_variables.singleTaxiReplayData;
         for (var i = 0, len = Pointsdata.length; i < len; i++) {
           var item = Pointsdata[i];
@@ -107,14 +130,37 @@
           //points[Pointsdata.length] = [lon,lat]
           var CorridorPrimitive = new mars3d.graphic.CorridorPrimitive({
             positions: points,
+=======
+        var Pointsdata = mars3d.global_variables.singleTaxiReplayData
+        for (var i = 0, len = Pointsdata.length; i < len-1; i++) {
+          var item = Pointsdata[i];
+          var item2 = Pointsdata[i+1];
+          var lng = Number(item["lon"]); //缁忓害
+          var lat = Number(item["lat"]); //绾害
+          var lng2 = Number(item2["lon"]); //缁忓害
+          var lat2 = Number(item2["lat"]); //绾害
+          var position = null;
+          var position2 = null;
+          if (lng && lat&&lng2&&lat2) {
+            position = Cesium.Cartesian3.fromDegrees(lng, lat);
+            position2 = Cesium.Cartesian3.fromDegrees(lng2, lat2);
+          }
+          item = changeNullAndundefinedToEmpty(item)
+          var CircleEntity = new mars3d.graphic.CorridorEntity({
+            positions: [position,position2],
+>>>>>>> 6c1b125337b8a53e57151f36661ded58daf4d534
             style: {
-              with: 50,
-              height: 0,
-              diffHeight: this.qindex == "co" ? 1000 * item[this.qindex] : item[this.qindex] || item[qindex] == "/" ? 3000 : item[qindex], //楂樺害
+              // length: 60.0,
+		      width: 10.0,
+		      height: 0,
+		      cornerType: Cesium.CornerType.BEVELED,
+              // radius: 8.0,
+              diffHeight: this.qindex == "co" ? 300 * item[this.qindex] :  item[this.qindex]  || item[this.qindex] == "/" ? 500 : item[this.qindex], //楂樺害
               color:this.viewWindow.getLayerPointColorByQindexandValue(1004,this.qindex, item[this.qindex]),
-              opacity: 0.5,
+              opacity: 0.6,
+              // rotationDegree: 45,
               highlight: {
-                opacity: 1
+               opacity: 1
               }
             },
             item: item,
@@ -133,41 +179,41 @@
             "<tr><td>CO锛�</td><td align= right>" + item["co"] + '&nbsp' + "</td><td>mg/m鲁</td></tr>" +
             "</table>" 
           });
-          this.routeLayer.addGraphic(CorridorPrimitive);
+          this.routeLayer.addGraphic(CircleEntity);
         }
         this.routeLayer.flyTo();
     }
-
+ 
     setSingleTaxiReplayData(datas) {
       mars3d.global_variables.singleTaxiReplayData = datas;
     }
-
+ 
     refreshDetailTable(tmpattr) {
       this.viewWindow.refreshDetailTable(tmpattr);
     }
-
+ 
     //鍒濆鍖朳浠呮墽琛�1娆
     create() {
-
+ 
       this.gaodeRoute = new mars3d.query.GaodeRoute({
         // key: ['ae29a37307840c7ae4a785ac905927e0'],
       });
       this.gaodePOI = new mars3d.query.GaodePOI({
         // key: ['ae29a37307840c7ae4a785ac905927e0'],
       });
-
+ 
       //鍥惧眰绠$悊浣跨敤鐨勫垎缁�
       this.groupLayer = new mars3d.layer.GroupLayer({
         name: this.config.name,
         pid: 50, //鍥惧眰绠$悊 涓娇鐢紝鐖惰妭鐐筰d
       });
-
+ 
       //鍒涘缓鐭㈤噺鏁版嵁鍥惧眰
       this.pointLayer = new mars3d.layer.GraphicLayer({
         name: this.config.name + "-璧锋鐐�",
       });
       this.groupLayer.addLayer(this.pointLayer); //鍔犲叆鍒嗙粍
-
+ 
       this.routeLayer = new mars3d.layer.GraphicLayer({
         name: this.config.name + "-璺嚎",
       });
@@ -202,7 +248,7 @@
       this.map.clock.stopTime = this.old_map_clock_stopTime;
       this.map.clock.multiplier = this.old_map_clock_multiplier;
       mars3d.global_variables.is_single_taxi_replaying = false;
-
+ 
       if (this.startGraphic) {
         this.startGraphic.remove();
         this.startGraphic = null;
@@ -212,7 +258,7 @@
         this.endGraphic = null;
       }
       this.map.removeLayer(this.groupLayer);
-
+ 
     }
     
     //婕父鑷姩缁撴潫 鎴栫偣鍑� 鍋滄瀵艰埅鎸夐挳 鍚庯紝閲嶇疆鐣岄潰鍜屾搷浣�
@@ -220,12 +266,12 @@
       // 鏆傚仠鍥炴斁
       this.map.clock.shouldAnimate = false;
     }
-
+ 
     ContinueReplay() {
       // 缁х画鍥炴斁
       this.map.clock.shouldAnimate = true;
     }
-
+ 
     //鍙栨秷褰撳墠鐨勮瑙掕窡闅�
     removeTrack() {
       if (this.nowFline) {
@@ -241,7 +287,7 @@
       this.map.clock.currentTime = Cesium.JulianDate.fromDate(new Date(this.appDateHourStart));
       this.map.clock.stopTime = Cesium.JulianDate.fromDate(new Date(this.appDateHourEnd));
       this.map.clock.multiplier = 2.0;
-
+ 
     }
     //============寮�濮嬭瑙掕窡闅�=============
     startGS() {
@@ -253,9 +299,9 @@
     }
    
   }
-
+ 
   //娉ㄥ唽鍒皐idget绠$悊鍣ㄤ腑銆�
   mars3d.widget.bindClass(MyWidget);
-
+ 
   //姣忎釜widet涔嬮棿閮芥槸鐩存帴寮曞叆鍒癷ndex.html涓紝浼氬瓨鍦ㄥ郊姝ゅ懡鍚嶅啿绐侊紝鎵�浠ラ棴鍖呭鐞嗕笅銆�
-})(window, mars3d);
+})(window, mars3d);
\ No newline at end of file

--
Gitblit v1.9.1