From 9b9f6e309a0b0ffd5c2495eaf8438b36704991a6 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Mon, 28 Sep 2020 11:02:07 +0800
Subject: [PATCH] update

---
 src/main/webapp/view/cartrajectory.jsp |   40 ++++++++++++++++++++++++++++++++++++----
 1 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/src/main/webapp/view/cartrajectory.jsp b/src/main/webapp/view/cartrajectory.jsp
index 9897869..700a48b 100644
--- a/src/main/webapp/view/cartrajectory.jsp
+++ b/src/main/webapp/view/cartrajectory.jsp
@@ -263,6 +263,26 @@
     }
     var trackPoints = []; //���������������������������������������������������������������
     if (sensorInfo.length > 0) {
+        for (var i = 0; i <sensorInfo.length ; i++) {
+            if (typeof (sensorInfo[i]["e76"]) == "undefined") {
+                sensorInfo.splice(i,1);
+                i--;
+            }else {
+                var lon = parseFloat(sensorInfo[i].e76.substr(0, sensorInfo[i].e76.length - 1));
+                var lat = parseFloat(sensorInfo[i].e77.substr(0, sensorInfo[i].e77.length - 1));
+                if (lon>150 || lon<70 || lat<=20 || lat>60){
+                    sensorInfo.splice(i,1);
+                    i--;
+                }
+                if (i>1){
+                    if (sensorInfo[i]["e76"]==sensorInfo[i-1]["e76"] && sensorInfo[i]["e77"]==sensorInfo[i-1]["e77"]){
+                        sensorInfo.splice(i,1);
+                        i--;
+                    }
+                }
+            }
+        }
+
         $.each(sensorInfo, function (item, value) {
             if (typeof (value.e76) == "undefined") {
                 showNoFlightTrajectory();
@@ -331,7 +351,7 @@
             map.addOverlay(polyline);
             var winOpts = {
                 width: 250, // ������������������
-                height: 175, // ������������������
+                height: 195, // ������������������
             }
             var textArea = "<div style='width: 250px;height: 200px;margin-left: -8px'>";
             if (lat==PointArr.lat){
@@ -340,9 +360,20 @@
             }else {
                 var data="<p style='height: 30px;font-size: 15px;font-weight: bold;padding: 10px 0 0 13px;color: #2aabd2'>"+"������������"+"</p>";
                 data=data+"<p style='padding:10px 0 0 18px '>"+"���������"+info["time"]+"</p>";
-                data=data+"<p style='padding:10px 0 0 18px '>"+"PM2.5���"+info["e1"]+"</p>";
-                data=data+"<p style='padding:10px 0 0 18px '>"+"PM10���"+info["e2"]+"</p>";
-                data=data+"<p style='padding:10px 0 0 18px '>"+"VOCs���������"+info["e40"]+"</p>";
+                if (typeof(info["e1"])!="undefined"){
+                    data=data+"<p style='padding:10px 0 0 18px '>"+"PM2.5���"+info["e1"]+"</p>";
+                }
+                if (typeof(info["e2"])!="undefined"){
+                    data=data+"<p style='padding:10px 0 0 18px '>"+"PM10���"+info["e2"]+"</p>";
+                }
+
+                if (typeof(info["e40"])!="undefined"){
+                    data=data+"<p style='padding:10px 0 0 18px '>"+"TSP���"+info["e40"]+"</p>";
+                }
+
+                if (typeof (info["e17"])!="undefined"){
+                    data=data+"<p style='padding:10px 0 0 18px '>"+"VOCs���������"+info["e17"]+"</p>";
+                }
                 textArea=textArea+data+"</div>";
             }
 
@@ -367,6 +398,7 @@
     }
 
 
+
     //���������������������������
     function addMarkerEnd(point, name, mapInit, trackUnit, prePoint) {
         if (name == "������������") {

--
Gitblit v1.8.0