|
@@ -92,10 +92,12 @@ public abstract class PhotoFragment extends LatteDelegate implements TakePhoto.T
|
|
|
public AMap aMap;
|
|
|
public MapView mapView;
|
|
|
private boolean isLocation = true;
|
|
|
- private boolean isRed = true;
|
|
|
+
|
|
|
public static final int VIDEO_REQUEST_CODE = 66;
|
|
|
private boolean flag = true;
|
|
|
private boolean isFirst = true;
|
|
|
+ private LocationUtil_xu.CoordinateClass locationWater = null;
|
|
|
+
|
|
|
|
|
|
@CallSuper
|
|
|
@Override
|
|
@@ -107,6 +109,7 @@ public abstract class PhotoFragment extends LatteDelegate implements TakePhoto.T
|
|
|
initMap(savedInstanceState);
|
|
|
mapLoadHelper.setMapLocationListener((aMpPoint, addr, arcgisPoint) -> {
|
|
|
lo = new LocationUtil_xu.CoordinateClass(arcgisPoint.longitude, arcgisPoint.latitude, addr);
|
|
|
+ locationWater = lo;
|
|
|
if (TextUtils.isEmpty(addr)) {
|
|
|
mapLoadHelper.resetLocation();
|
|
|
}
|
|
@@ -134,13 +137,6 @@ public abstract class PhotoFragment extends LatteDelegate implements TakePhoto.T
|
|
|
this.isLocation = isLocation;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- * 设置定位图标
|
|
|
- */
|
|
|
- public void setIsRed(boolean isRed) {
|
|
|
- this.isRed = isRed;
|
|
|
- }
|
|
|
-
|
|
|
private void initMap(Bundle savedInstanceState) {
|
|
|
mapView = rootView.findViewById(R.id.map_view);
|
|
|
if (mapView != null) {
|
|
@@ -188,9 +184,6 @@ public abstract class PhotoFragment extends LatteDelegate implements TakePhoto.T
|
|
|
double longitude = cameraPosition.target.longitude;
|
|
|
LatLng latLng = new LatLng(latitude, longitude);
|
|
|
LocationUtil_xu.CoordinateClass coordinate = LocationUtil_xu.gcj02towgs84(longitude, latitude);
|
|
|
- if (coordinate == null) {
|
|
|
- return;
|
|
|
- }
|
|
|
double lng = LocationUtil_xu.formatLocationDouble(coordinate.Longtitude);
|
|
|
double lat = LocationUtil_xu.formatLocationDouble(coordinate.Latitude);
|
|
|
LatLng mP = new LatLng(lat, lng);
|
|
@@ -217,6 +210,7 @@ public abstract class PhotoFragment extends LatteDelegate implements TakePhoto.T
|
|
|
public void onRegeocodeSearched(RegeocodeResult regeocodeResult, int i) {
|
|
|
RegeocodeAddress regeocodeAddress = regeocodeResult.getRegeocodeAddress();
|
|
|
LocationUtil_xu.CoordinateClass loNew = new LocationUtil_xu.CoordinateClass(gisPoint.longitude, gisPoint.latitude, regeocodeAddress.getFormatAddress());
|
|
|
+ locationWater = loNew;
|
|
|
String headName = regeocodeAddress.getProvince() +
|
|
|
(regeocodeAddress.getCity().isEmpty() ? "" : ("/" + regeocodeAddress.getCity())) +
|
|
|
(regeocodeAddress.getDistrict().isEmpty() ? "" : ("/" + regeocodeAddress.getDistrict()) +
|
|
@@ -343,10 +337,7 @@ public abstract class PhotoFragment extends LatteDelegate implements TakePhoto.T
|
|
|
TImage tImage = result.getImage();
|
|
|
tImage.setOriginalPath(absolutePath);
|
|
|
}
|
|
|
- takeGraffiti(result.getImage().getOriginalPath());
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ takeGraffiti(result.getImage().getOriginalPath());
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -389,11 +380,11 @@ public abstract class PhotoFragment extends LatteDelegate implements TakePhoto.T
|
|
|
|
|
|
protected WaterMarkParams getWaterMarkParams() {
|
|
|
WaterMarkParams params = null;
|
|
|
- if (lo != null) {
|
|
|
+ if (locationWater != null) {
|
|
|
params = new WaterMarkParams();
|
|
|
params.mbNeedGps = 1;
|
|
|
- String strLng = LocationUtil_xu.formatLocation(lo.Longtitude);
|
|
|
- String strLat = LocationUtil_xu.formatLocation(lo.Latitude);
|
|
|
+ String strLng = LocationUtil_xu.formatLocation(locationWater.Longtitude);
|
|
|
+ String strLat = LocationUtil_xu.formatLocation(locationWater.Latitude);
|
|
|
if (!strLng.isEmpty() && !strLat.isEmpty()) {
|
|
|
double lng = Double.parseDouble(strLng);
|
|
|
double lat = Double.parseDouble(strLat);
|
|
@@ -402,7 +393,7 @@ public abstract class PhotoFragment extends LatteDelegate implements TakePhoto.T
|
|
|
params.mLongitude = strLng;
|
|
|
params.mLatitude = strLat;
|
|
|
}
|
|
|
- params.mAddress = lo.addr;
|
|
|
+ params.mAddress = locationWater.addr;
|
|
|
UserBean userBean = new UserBean();
|
|
|
params.mUser = userBean.getUsername();
|
|
|
params.mReportTime = DateUtils.getDate();
|