From 71ac5ea208fb15da401b980fe788d03ed0f086b1 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期三, 04 十二月 2024 09:56:14 +0800
Subject: [PATCH] 1.添加退出登录时判断是否开启巡检,开启巡检不可退出登录。 2.添加异常退出后恢复巡检记录的功能。 3.添加统一的提示Dialog

---
 app/src/main/assets/js/map.js |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/app/src/main/assets/js/map.js b/app/src/main/assets/js/map.js
index f149f39..a3f9e30 100644
--- a/app/src/main/assets/js/map.js
+++ b/app/src/main/assets/js/map.js
@@ -19,6 +19,7 @@
 
     });
     window.onload = function () {
+        console.log(window.onload);  // 鎵撳嵃鏁扮粍鏁版嵁
         //鍔犺浇鍧愭爣鐐�
         window.Android.loadMarker();
     };
@@ -167,6 +168,7 @@
         window.addMarker = addMarker;
         window.setCenterAndZoom = setCenterAndZoom;
         window.updateLocation = updateLocation;
+        window.aginShowLocation = aginShowLocation;
     }
 
     // 璋冪敤鍘熺敓瀹夊崜鏂规硶鏄剧ず鍙栨按鍙h鎯�
@@ -283,8 +285,8 @@
         map.addOverLay(lineLayer);
         let icon = new T.Icon({
             iconUrl: locationIMGPath,
-            iconSize: new T.Point(27, 27),
-            iconAnchor: new T.Point(13, 20)
+            iconSize: new T.Point(20, 20),
+            iconAnchor: new T.Point(10, 10)
         });
         if (locationMarker) {
             map.removeOverLay(locationMarker);
@@ -296,6 +298,15 @@
         // }, 500);
 
     }
+    var aginPath = [];
+    function aginShowLocation(lng, lat) {
+        // 璋冪敤 Android 鎻愪緵鐨勬帴鍙o紝鑾峰彇鏁版嵁
+        console.log("aginShowLocation>>lng:"+lng+">>>lat:"+lat);
+        var newPoint = new T.LngLat(lng, lat);
+        aginPath.push(newPoint);
+        lineLayer.setLngLats(aginPath);
+        map.addOverLay(lineLayer);
+    }
 
 
 })();

--
Gitblit v1.8.0