From af3537dcff549431efe653359f1b34c86b77432e Mon Sep 17 00:00:00 2001
From: fuchengshen <men883234@gmail.com>
Date: 星期三, 19 十月 2022 16:59:02 +0800
Subject: [PATCH] 上海遮罩层更改
---
widgetsTS/taxiRouteReplay/widget.js | 130 +++++++++++++++++++++++++++++--------------
1 files changed, 88 insertions(+), 42 deletions(-)
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"] + ' ' + "</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