From 47e311ca65164baf2e028ac1ccf317d39a1d6a26 Mon Sep 17 00:00:00 2001
From: zhaoxing <zhaoxing@shsening.com>
Date: 星期二, 18 十月 2022 13:47:45 +0800
Subject: [PATCH] 车辆撒点样式改用走廊
---
widgetsTS/taxiRouteReplay/widget.js | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/widgetsTS/taxiRouteReplay/widget.js b/widgetsTS/taxiRouteReplay/widget.js
index 1c94beb..8558fce 100644
--- a/widgetsTS/taxiRouteReplay/widget.js
+++ b/widgetsTS/taxiRouteReplay/widget.js
@@ -85,24 +85,27 @@
}}
addTaxiPointInfoGraphic() {
- var Pointsdata = mars3d.global_variables.singleTaxiReplayData
+ var Pointsdata = mars3d.global_variables.singleTaxiReplayData;
+ var points = [];
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);
- }
+ // var position = null;
+ // if (lng && lat) {
+ // //position = Cesium.Cartesian3.fromDegrees(lng, lat);
+ // }
+ points[Pointsdata.length] = [lng, lat];
+
item = changeNullAndundefinedToEmpty(item)
- var CircleEntity = new mars3d.graphic.CircleEntity({
- position: position,
+ var CorridorPrimitive = new mars3d.graphic.CorridorPrimitive({
+ position: points,
style: {
- radius: 8.0,
- diffHeight: this.qindex == "co" ? 20 * item[this.qindex] : item[this.qindex], //楂樺害
+ with: 50,
+ height: 0,
+ diffHeight: this.qindex == "co" ? 1000 * item[this.qindex] : item[this.qindex] || item[qindex] == "/" ? 3000 : item[qindex], //楂樺害
color:this.viewWindow.getLayerPointColorByQindexandValue(1004,this.qindex, item[this.qindex]),
opacity: 0.5,
- rotationDegree: 45,
highlight: {
opacity: 1
}
@@ -123,7 +126,7 @@
"<tr><td>CO锛�</td><td align= right>" + item["co"] + ' ' + "</td><td>mg/m鲁</td></tr>" +
"</table>"
});
- this.routeLayer.addGraphic(CircleEntity);
+ this.routeLayer.addGraphic(CorridorPrimitive);
}
this.routeLayer.flyTo();
}
--
Gitblit v1.9.1