|
@@ -631,18 +631,22 @@ public class WaterCheckFragment extends PhotoFragment {
|
|
|
binding.llMap.imgLocation.setOnClickListener(v -> {
|
|
|
if (MyApp.getInstance().isOverTime() && lo != null) {
|
|
|
moveOrigin(lo.Longtitude, lo.Latitude);
|
|
|
-
|
|
|
-
|
|
|
- binding.edUserAddr.setText(lo.addr);
|
|
|
+ if (!TextUtils.isEmpty(lo.addr)) {
|
|
|
+ binding.edUserAddr.setText(lo.addr);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
binding.llMap.imgMap.setOnClickListener(v -> {
|
|
|
checkMap();
|
|
|
});
|
|
|
- locationUtilXuNew = new LocationUtil_xu.CoordinateClass(Double.parseDouble(waterMeterEntity.getLongitude())
|
|
|
- , Double.parseDouble(waterMeterEntity.getLatitude()));
|
|
|
- moveOrigin(locationUtilXuNew.Longtitude, locationUtilXuNew.Latitude);
|
|
|
- binding.edUserAddr.setText(locationUtilXuNew.addr);
|
|
|
+ if (waterMeterEntity != null && waterMeterEntity.getLatitude() != null && waterMeterEntity.getLongitude() != null) {
|
|
|
+ locationUtilXuNew = new LocationUtil_xu.CoordinateClass(Double.parseDouble(waterMeterEntity.getLongitude())
|
|
|
+ , Double.parseDouble(waterMeterEntity.getLatitude()), waterMeterEntity.getUserAddr());
|
|
|
+ moveOrigin(locationUtilXuNew.Longtitude, locationUtilXuNew.Latitude);
|
|
|
+ if (!TextUtils.isEmpty(locationUtilXuNew.addr)) {
|
|
|
+ binding.edUserAddr.setText(locationUtilXuNew.addr);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -656,6 +660,9 @@ public class WaterCheckFragment extends PhotoFragment {
|
|
|
super.initMapListener(info);
|
|
|
locationUtilXuNew = info;
|
|
|
binding.edInstallPosition.setText("经度:" + locationUtilXuNew.Longtitude + " 纬度:" + locationUtilXuNew.Latitude);
|
|
|
+ if (!TextUtils.isEmpty(locationUtilXuNew.addr)) {
|
|
|
+ binding.edUserAddr.setText(locationUtilXuNew.addr);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -677,6 +684,9 @@ public class WaterCheckFragment extends PhotoFragment {
|
|
|
if (locationUtilXuNew != null) {
|
|
|
moveOrigin(locationUtilXuNew.Longtitude, locationUtilXuNew.Latitude);
|
|
|
binding.edInstallPosition.setText("经度:" + locationUtilXuNew.Longtitude + " 纬度:" + locationUtilXuNew.Latitude);
|
|
|
+ if (!TextUtils.isEmpty(locationUtilXuNew.addr)) {
|
|
|
+ binding.edUserAddr.setText(locationUtilXuNew.addr);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|