Procházet zdrojové kódy

重新打包上传

andyliu před 6 měsíci
rodič
revize
e23c038885

+ 5 - 5
moduleGis/src/main/java/com/example/moduleGis/APIModuleGis.java

@@ -1314,8 +1314,8 @@ public class APIModuleGis extends UZModule {
 				}
 				if (mWaitAMapSingleBack.compareAndSet(true, false)){
 					if (mLocationClient != null){
-						mLocationClient.stopLocation();
-						mStartedAMapLocation.set(false);
+						//mLocationClient.stopLocation();
+						//mStartedAMapLocation.set(false);
 					}
 				}
 			}
@@ -1377,7 +1377,7 @@ public class APIModuleGis extends UZModule {
 			this.data = data;
 		}
 		public String toString(){
-			return "{\"code\":"+code+",\"acceptTime\":"+acceptTime+",\"data\":"+ com.qx.wz.external.fastjson.JSONObject.toJSONString(data) +"}";
+			return "{\"code\":"+code+",\"acceptTime\":"+acceptTime+",\"data\":"+ (data==null?"":com.qx.wz.external.fastjson.JSONObject.toJSONString(data)) +"}";
 		}
 	}
 	CircularFifoQueue<AMapZidingyiLocation> lastAMapLocations = new CircularFifoQueue<>(10);
@@ -1433,7 +1433,7 @@ public class APIModuleGis extends UZModule {
 			List<String> result = new ArrayList<>();
 			synchronized (LATCH_COMM){
 				for (AMapZidingyiLocation element : lastAMapLocations){
-					result.add(0, element.toString());
+					result.add(0, element==null?"{}":element.toString());
 				}
 			}
 			code = "0";
@@ -1483,7 +1483,7 @@ public class APIModuleGis extends UZModule {
 			List<String> result = new ArrayList<>();
 			synchronized (LATCH_COMM){
 				for (AMapZidingyiLocation element : lastAMapLocations){
-					result.add(0, com.qx.wz.external.fastjson.JSONObject.toJSONString(element));
+					result.add(0, element.toString()/*com.qx.wz.external.fastjson.JSONObject.toJSONString(element)*/);
 				}
 			}
 			res.put("data",result);