Преглед изворни кода

APIModuleGis 增加获取测地通广播坐标方式 1.2.5

1037015548@qq.com пре 1 година
родитељ
комит
17a64206bd
1 измењених фајлова са 10 додато и 7 уклоњено
  1. 10 7
      moduleGis/src/main/java/com/example/moduleGis/APIModuleGis.java

+ 10 - 7
moduleGis/src/main/java/com/example/moduleGis/APIModuleGis.java

@@ -144,7 +144,7 @@ public class APIModuleGis extends UZModule {
 		try {
 			res.put("code", "1");
 			res.put("msg", "");
-			res.put("version", "1.2.3");
+			res.put("version", "1.2.5");
 
 			//TODO 逻辑块
 			Map<String,Object> dataMap = new HashMap<>();
@@ -154,11 +154,14 @@ public class APIModuleGis extends UZModule {
 			dataMap.put("solveStatus",ReceiveLocationBroadcastReceiver.solveStatus);
 			dataMap.put("conenctItent",ReceiveLocationBroadcastReceiver.conenctItent);
 
-			ReceiveLocationBroadcastReceiver.wgslng = "";
-			ReceiveLocationBroadcastReceiver.wgslat = "";
-			ReceiveLocationBroadcastReceiver.wgsblh = "";
-			ReceiveLocationBroadcastReceiver.solveStatus = "";
-			ReceiveLocationBroadcastReceiver.conenctItent = "1";
+			if((System.currentTimeMillis()-ReceiveLocationBroadcastReceiver.timeLong) > 3000){
+				ReceiveLocationBroadcastReceiver.wgslng = "";
+				ReceiveLocationBroadcastReceiver.wgslat = "";
+				ReceiveLocationBroadcastReceiver.wgsblh = "";
+				ReceiveLocationBroadcastReceiver.solveStatus = "";
+				ReceiveLocationBroadcastReceiver.conenctItent = "1";
+			}
+
 			res.put("code","0");
 			res.put("data", com.qx.wz.external.fastjson.JSONObject.toJSONString(dataMap));
 		}catch(Exception ex){
@@ -211,7 +214,7 @@ public class APIModuleGis extends UZModule {
 		try {
 			res.put("code",code);
 			res.put("msg",msg);
-			res.put("version","1.2.2");
+			res.put("version","1.2.5");
 			res.put("gnssInfoJson",gnssInfoJson);
 
 			BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();