fix: 修改点数据照片坐标错误问题,修改面数据点击完成采集功能

This commit is contained in:
2023-02-03 13:44:11 +08:00
parent b6a6c85da7
commit 3f8ee91230
6 changed files with 65 additions and 47 deletions

View File

@@ -50,6 +50,7 @@ import com.navinfo.outdoor.room.PoiDatabase;
import com.navinfo.outdoor.room.PoiEntity; import com.navinfo.outdoor.room.PoiEntity;
import com.navinfo.outdoor.util.Geohash; import com.navinfo.outdoor.util.Geohash;
import com.navinfo.outdoor.util.GeometryTools; import com.navinfo.outdoor.util.GeometryTools;
import com.navinfo.outdoor.util.LocationLifeCycle;
import com.navinfo.outdoor.util.PhotoUtils; import com.navinfo.outdoor.util.PhotoUtils;
import com.navinfo.outdoor.util.TimestampUtil; import com.navinfo.outdoor.util.TimestampUtil;
import com.navinfo.outdoor.util.ToastUtils; import com.navinfo.outdoor.util.ToastUtils;
@@ -1046,70 +1047,70 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
case R.id.rl_panorama: case R.id.rl_panorama:
chargingPileBuilder.append("点击了全景照片进行拍照,"); chargingPileBuilder.append("点击了全景照片进行拍照,");
Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class); Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class);
File panoramaFile = PhotoUtils.showPhotoFile("a", latLng); File panoramaFile = PhotoUtils.showPhotoFile("a", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, panoramaFile.getPath()); intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, panoramaFile.getPath());
startActivityForResult(intentPanorama, 101); startActivityForResult(intentPanorama, 101);
break; break;
case R.id.rl_coding: case R.id.rl_coding:
chargingPileBuilder.append("点击了充电桩编码进行拍照,"); chargingPileBuilder.append("点击了充电桩编码进行拍照,");
Intent intentCoding = new Intent(getActivity(), PhotographActivity.class); Intent intentCoding = new Intent(getActivity(), PhotographActivity.class);
File codingFile = PhotoUtils.showPhotoFile("b", latLng); File codingFile = PhotoUtils.showPhotoFile("b", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentCoding.putExtra(Constant.INTENT_PHOTO_PATH, codingFile.getPath()); intentCoding.putExtra(Constant.INTENT_PHOTO_PATH, codingFile.getPath());
startActivityForResult(intentCoding, 102); startActivityForResult(intentCoding, 102);
break; break;
case R.id.rl_equipment: case R.id.rl_equipment:
chargingPileBuilder.append("点击了设备标牌进行拍照,"); chargingPileBuilder.append("点击了设备标牌进行拍照,");
Intent intentEquipment = new Intent(getActivity(), PhotographActivity.class); Intent intentEquipment = new Intent(getActivity(), PhotographActivity.class);
File equipmentFile = PhotoUtils.showPhotoFile("c", latLng); File equipmentFile = PhotoUtils.showPhotoFile("c", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentEquipment.putExtra(Constant.INTENT_PHOTO_PATH, equipmentFile.getPath()); intentEquipment.putExtra(Constant.INTENT_PHOTO_PATH, equipmentFile.getPath());
startActivityForResult(intentEquipment, 103); startActivityForResult(intentEquipment, 103);
break; break;
case R.id.rl_facility: case R.id.rl_facility:
chargingPileBuilder.append("点击了设备标牌进行拍照,"); chargingPileBuilder.append("点击了设备标牌进行拍照,");
Intent intentFacility = new Intent(getActivity(), PhotographActivity.class); Intent intentFacility = new Intent(getActivity(), PhotographActivity.class);
File facilityFile = PhotoUtils.showPhotoFile("c", latLng); File facilityFile = PhotoUtils.showPhotoFile("c", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentFacility.putExtra(Constant.INTENT_PHOTO_PATH, facilityFile.getPath()); intentFacility.putExtra(Constant.INTENT_PHOTO_PATH, facilityFile.getPath());
startActivityForResult(intentFacility, 104); startActivityForResult(intentFacility, 104);
break; break;
case R.id.rl_scutcheon: case R.id.rl_scutcheon:
chargingPileBuilder.append("点击了设备标牌进行拍照,"); chargingPileBuilder.append("点击了设备标牌进行拍照,");
Intent intentScutcheon = new Intent(getActivity(), PhotographActivity.class); Intent intentScutcheon = new Intent(getActivity(), PhotographActivity.class);
File scutcheonFile = PhotoUtils.showPhotoFile("c", latLng); File scutcheonFile = PhotoUtils.showPhotoFile("c", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentScutcheon.putExtra(Constant.INTENT_PHOTO_PATH, scutcheonFile.getPath()); intentScutcheon.putExtra(Constant.INTENT_PHOTO_PATH, scutcheonFile.getPath());
startActivityForResult(intentScutcheon, 105); startActivityForResult(intentScutcheon, 105);
break; break;
case R.id.rl_device: case R.id.rl_device:
chargingPileBuilder.append("点击了设备标牌进行拍照,"); chargingPileBuilder.append("点击了设备标牌进行拍照,");
Intent intentDevice = new Intent(getActivity(), PhotographActivity.class); Intent intentDevice = new Intent(getActivity(), PhotographActivity.class);
File deviceFile = PhotoUtils.showPhotoFile("c", latLng); File deviceFile = PhotoUtils.showPhotoFile("c", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentDevice.putExtra(Constant.INTENT_PHOTO_PATH, deviceFile.getPath()); intentDevice.putExtra(Constant.INTENT_PHOTO_PATH, deviceFile.getPath());
startActivityForResult(intentDevice, 106); startActivityForResult(intentDevice, 106);
break; break;
case R.id.rl_usable: case R.id.rl_usable:
chargingPileBuilder.append("点击了可用状态进行拍照,"); chargingPileBuilder.append("点击了可用状态进行拍照,");
Intent intentUsable = new Intent(getActivity(), PhotographActivity.class); Intent intentUsable = new Intent(getActivity(), PhotographActivity.class);
File usableFile = PhotoUtils.showPhotoFile("d", latLng); File usableFile = PhotoUtils.showPhotoFile("d", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentUsable.putExtra(Constant.INTENT_PHOTO_PATH, usableFile.getPath()); intentUsable.putExtra(Constant.INTENT_PHOTO_PATH, usableFile.getPath());
startActivityForResult(intentUsable, 107); startActivityForResult(intentUsable, 107);
break; break;
case R.id.rl_available: case R.id.rl_available:
chargingPileBuilder.append("点击了可用专题进行拍照,"); chargingPileBuilder.append("点击了可用专题进行拍照,");
Intent intentAvailable = new Intent(getActivity(), PhotographActivity.class); Intent intentAvailable = new Intent(getActivity(), PhotographActivity.class);
File availableFile = PhotoUtils.showPhotoFile("d", latLng); File availableFile = PhotoUtils.showPhotoFile("d", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentAvailable.putExtra(Constant.INTENT_PHOTO_PATH, availableFile.getPath()); intentAvailable.putExtra(Constant.INTENT_PHOTO_PATH, availableFile.getPath());
startActivityForResult(intentAvailable, 108); startActivityForResult(intentAvailable, 108);
break; break;
case R.id.rl_parking: case R.id.rl_parking:
chargingPileBuilder.append("点击了停车位编号进行拍照,"); chargingPileBuilder.append("点击了停车位编号进行拍照,");
Intent intentParking = new Intent(getActivity(), PhotographActivity.class); Intent intentParking = new Intent(getActivity(), PhotographActivity.class);
File parkingFile = PhotoUtils.showPhotoFile("e", latLng); File parkingFile = PhotoUtils.showPhotoFile("e", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentParking.putExtra(Constant.INTENT_PHOTO_PATH, parkingFile.getPath()); intentParking.putExtra(Constant.INTENT_PHOTO_PATH, parkingFile.getPath());
startActivityForResult(intentParking, 109); startActivityForResult(intentParking, 109);
break; break;
case R.id.rl_number: case R.id.rl_number:
chargingPileBuilder.append("点击了停车位编号进行拍照,"); chargingPileBuilder.append("点击了停车位编号进行拍照,");
Intent intentNumber = new Intent(getActivity(), PhotographActivity.class); Intent intentNumber = new Intent(getActivity(), PhotographActivity.class);
File numberFile = PhotoUtils.showPhotoFile("e", latLng); File numberFile = PhotoUtils.showPhotoFile("e", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentNumber.putExtra(Constant.INTENT_PHOTO_PATH, numberFile.getPath()); intentNumber.putExtra(Constant.INTENT_PHOTO_PATH, numberFile.getPath());
startActivityForResult(intentNumber, 110); startActivityForResult(intentNumber, 110);
break; break;

View File

@@ -52,6 +52,7 @@ import com.navinfo.outdoor.adapter.ChargingPileAdapter;
import com.navinfo.outdoor.api.Constant; import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.base.BaseDrawerFragment; import com.navinfo.outdoor.base.BaseDrawerFragment;
import com.navinfo.outdoor.util.FlushTokenUtil; import com.navinfo.outdoor.util.FlushTokenUtil;
import com.navinfo.outdoor.util.LocationLifeCycle;
import com.navinfo.outdoor.util.PreserveUtils; import com.navinfo.outdoor.util.PreserveUtils;
import com.navinfo.outdoor.util.TimestampUtil; import com.navinfo.outdoor.util.TimestampUtil;
import com.navinfo.outdoor.util.ToastUtils; import com.navinfo.outdoor.util.ToastUtils;
@@ -1052,35 +1053,35 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
case R.id.rl_panorama: case R.id.rl_panorama:
chargingStationBuilder.append(TimestampUtil.time()).append("点击了全景照片进行拍照 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了全景照片进行拍照 ,");
Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class); Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class);
File PanoramaFile = PhotoUtils.showPhotoFile("a", latLng); File PanoramaFile = PhotoUtils.showPhotoFile("a", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, PanoramaFile.getPath()); intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, PanoramaFile.getPath());
startActivityForResult(intentPanorama, 101); startActivityForResult(intentPanorama, 101);
break; break;
case R.id.rl_name: case R.id.rl_name:
chargingStationBuilder.append(TimestampUtil.time()).append("点击了名称照片进行拍照 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了名称照片进行拍照 ,");
Intent intentName = new Intent(getActivity(), PhotographActivity.class); Intent intentName = new Intent(getActivity(), PhotographActivity.class);
File nameFile = PhotoUtils.showPhotoFile("b", latLng); File nameFile = PhotoUtils.showPhotoFile("b", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentName.putExtra(Constant.INTENT_PHOTO_PATH, nameFile.getPath()); intentName.putExtra(Constant.INTENT_PHOTO_PATH, nameFile.getPath());
startActivityForResult(intentName, 102); startActivityForResult(intentName, 102);
break; break;
case R.id.rl_internal_photos: case R.id.rl_internal_photos:
chargingStationBuilder.append(TimestampUtil.time()).append("点击了服务说明进行拍照 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了服务说明进行拍照 ,");
Intent intentInternal = new Intent(getActivity(), PhotographActivity.class); Intent intentInternal = new Intent(getActivity(), PhotographActivity.class);
File internalFile = PhotoUtils.showPhotoFile("c", latLng); File internalFile = PhotoUtils.showPhotoFile("c", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentInternal.putExtra(Constant.INTENT_PHOTO_PATH, internalFile.getPath()); intentInternal.putExtra(Constant.INTENT_PHOTO_PATH, internalFile.getPath());
startActivityForResult(intentInternal, 103); startActivityForResult(intentInternal, 103);
break; break;
case R.id.rl_else: case R.id.rl_else:
chargingStationBuilder.append(TimestampUtil.time()).append("点击了充电站指引牌进行拍照 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了充电站指引牌进行拍照 ,");
Intent intentElse = new Intent(getActivity(), PhotographActivity.class); Intent intentElse = new Intent(getActivity(), PhotographActivity.class);
File elseFile = PhotoUtils.showPhotoFile("d", latLng); File elseFile = PhotoUtils.showPhotoFile("d", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentElse.putExtra(Constant.INTENT_PHOTO_PATH, elseFile.getPath()); intentElse.putExtra(Constant.INTENT_PHOTO_PATH, elseFile.getPath());
startActivityForResult(intentElse, 104); startActivityForResult(intentElse, 104);
break; break;
case R.id.rl_scutcheon: case R.id.rl_scutcheon:
chargingStationBuilder.append(TimestampUtil.time()).append("点击了停车收费标牌进行拍照 ,"); chargingStationBuilder.append(TimestampUtil.time()).append("点击了停车收费标牌进行拍照 ,");
Intent intentScutcheon = new Intent(getActivity(), PhotographActivity.class); Intent intentScutcheon = new Intent(getActivity(), PhotographActivity.class);
File scutcheonFile = PhotoUtils.showPhotoFile("e", latLng); File scutcheonFile = PhotoUtils.showPhotoFile("e", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentScutcheon.putExtra(Constant.INTENT_PHOTO_PATH, scutcheonFile.getPath()); intentScutcheon.putExtra(Constant.INTENT_PHOTO_PATH, scutcheonFile.getPath());
startActivityForResult(intentScutcheon, 105); startActivityForResult(intentScutcheon, 105);
break; break;

View File

@@ -343,7 +343,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
if (poiEntity != null) { if (poiEntity != null) {
int type = poiEntity.getType(); int type = poiEntity.getType();
if (type == 6) { if (type == 6) {
initSubmitPolygonTask(HttpInterface.COMPLETE, poiEntity); initSubmitPolygonTask(HttpInterface.COMPLETE+"/"+poiEntity.getTaskId(), poiEntity);
} else { } else {
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
@@ -752,10 +752,22 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
public void onSuccess(UnPolygonTaskBean response, int id) { public void onSuccess(UnPolygonTaskBean response, int id) {
dismissLoadingDialog(); dismissLoadingDialog();
if (response.getCode() == 200) { if (response.getCode() == 200) {
ToastUtils.Message(getActivity(), "结束采集成功!");
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntity(poiEntity); PoiDatabase.getInstance(getContext()).getPoiDao().deletePoiEntity(poiEntity);
// 隐藏半框弹出界面
Message obtain = Message.obtain();
obtain.what = Constant.GATHER_GET_RETURN;
obtain.obj = false;
EventBus.getDefault().post(obtain);
// 刷新地图
Message obtains = Message.obtain();
obtains.what = Constant.JOB_WORD_MONITOR;
obtains.obj = true;
EventBus.getDefault().post(obtains);
onBackPressed();
} }
}).start(); }).start();
} else if (response.getCode() == 230) { } else if (response.getCode() == 230) {

View File

@@ -44,6 +44,7 @@ import com.navinfo.outdoor.activity.PhotographActivity;
import com.navinfo.outdoor.api.Constant; import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.base.BaseDrawerFragment; import com.navinfo.outdoor.base.BaseDrawerFragment;
import com.navinfo.outdoor.util.FlushTokenUtil; import com.navinfo.outdoor.util.FlushTokenUtil;
import com.navinfo.outdoor.util.LocationLifeCycle;
import com.navinfo.outdoor.util.PreserveUtils; import com.navinfo.outdoor.util.PreserveUtils;
import com.navinfo.outdoor.util.TimestampUtil; import com.navinfo.outdoor.util.TimestampUtil;
import com.navinfo.outdoor.util.ToastUtils; import com.navinfo.outdoor.util.ToastUtils;
@@ -512,14 +513,14 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
case R.id.rl_picture: case R.id.rl_picture:
otherBuilder.append(TimestampUtil.time()).append(",").append("点击了第一个照片进行拍照 ,"); otherBuilder.append(TimestampUtil.time()).append(",").append("点击了第一个照片进行拍照 ,");
Intent intentPicture = new Intent(getActivity(), PhotographActivity.class); Intent intentPicture = new Intent(getActivity(), PhotographActivity.class);
File file = PhotoUtils.showPhotoFile("a", latLng); File file = PhotoUtils.showPhotoFile("a", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentPicture.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath()); intentPicture.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath());
startActivityForResult(intentPicture, 101); startActivityForResult(intentPicture, 101);
break; break;
case R.id.rl_pictures: case R.id.rl_pictures:
otherBuilder.append(TimestampUtil.time()).append(",").append("点击了第二个照片进行拍照 ,"); otherBuilder.append(TimestampUtil.time()).append(",").append("点击了第二个照片进行拍照 ,");
Intent intentPictures = new Intent(getActivity(), PhotographActivity.class); Intent intentPictures = new Intent(getActivity(), PhotographActivity.class);
File files = PhotoUtils.showPhotoFile("b", latLng); File files = PhotoUtils.showPhotoFile("b", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentPictures.putExtra(Constant.INTENT_PHOTO_PATH, files.getPath()); intentPictures.putExtra(Constant.INTENT_PHOTO_PATH, files.getPath());
startActivityForResult(intentPictures, 102); startActivityForResult(intentPictures, 102);
break; break;

View File

@@ -48,6 +48,7 @@ import com.navinfo.outdoor.api.Constant;
import com.navinfo.outdoor.base.BaseDrawerFragment; import com.navinfo.outdoor.base.BaseDrawerFragment;
import com.navinfo.outdoor.util.AWMp4ParserHelper; import com.navinfo.outdoor.util.AWMp4ParserHelper;
import com.navinfo.outdoor.util.FlushTokenUtil; import com.navinfo.outdoor.util.FlushTokenUtil;
import com.navinfo.outdoor.util.LocationLifeCycle;
import com.navinfo.outdoor.util.PreserveUtils; import com.navinfo.outdoor.util.PreserveUtils;
import com.navinfo.outdoor.util.TimestampUtil; import com.navinfo.outdoor.util.TimestampUtil;
import com.navinfo.outdoor.util.ToastUtils; import com.navinfo.outdoor.util.ToastUtils;
@@ -815,35 +816,35 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
case R.id.rl_panorama: case R.id.rl_panorama:
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了全景图的进行拍照,"); poiBuilder.append(TimestampUtil.time()).append(",").append("点击了全景图的进行拍照,");
Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class); Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class);
File filePanorama = PhotoUtils.showPhotoFile("a", latLng); File filePanorama = PhotoUtils.showPhotoFile("a", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, filePanorama.getPath()); intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, filePanorama.getPath());
startActivityForResult(intentPanorama, 101); startActivityForResult(intentPanorama, 101);
break; break;
case R.id.rl_name: case R.id.rl_name:
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了名称的进行拍照,"); poiBuilder.append(TimestampUtil.time()).append(",").append("点击了名称的进行拍照,");
Intent intentName = new Intent(getActivity(), PhotographActivity.class); Intent intentName = new Intent(getActivity(), PhotographActivity.class);
File fileName = PhotoUtils.showPhotoFile("b", latLng); File fileName = PhotoUtils.showPhotoFile("b", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentName.putExtra(Constant.INTENT_PHOTO_PATH, fileName.getPath()); intentName.putExtra(Constant.INTENT_PHOTO_PATH, fileName.getPath());
startActivityForResult(intentName, 102); startActivityForResult(intentName, 102);
break; break;
case R.id.rl_internal_photos: case R.id.rl_internal_photos:
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了内部照片的进行拍照,"); poiBuilder.append(TimestampUtil.time()).append(",").append("点击了内部照片的进行拍照,");
Intent intentInternal = new Intent(getActivity(), PhotographActivity.class); Intent intentInternal = new Intent(getActivity(), PhotographActivity.class);
File fileInternal = PhotoUtils.showPhotoFile("c", latLng); File fileInternal = PhotoUtils.showPhotoFile("c", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentInternal.putExtra(Constant.INTENT_PHOTO_PATH, fileInternal.getPath()); intentInternal.putExtra(Constant.INTENT_PHOTO_PATH, fileInternal.getPath());
startActivityForResult(intentInternal, 103); startActivityForResult(intentInternal, 103);
break; break;
case R.id.rl_card: case R.id.rl_card:
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了名片的进行拍照,"); poiBuilder.append(TimestampUtil.time()).append(",").append("点击了名片的进行拍照,");
Intent intentCard = new Intent(getActivity(), PhotographActivity.class); Intent intentCard = new Intent(getActivity(), PhotographActivity.class);
File fileCard = PhotoUtils.showPhotoFile("d", latLng); File fileCard = PhotoUtils.showPhotoFile("d", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentCard.putExtra(Constant.INTENT_PHOTO_PATH, fileCard.getPath()); intentCard.putExtra(Constant.INTENT_PHOTO_PATH, fileCard.getPath());
startActivityForResult(intentCard, 104); startActivityForResult(intentCard, 104);
break; break;
case R.id.rl_else: case R.id.rl_else:
poiBuilder.append(TimestampUtil.time()).append(",").append("点击了其他的进行拍照,"); poiBuilder.append(TimestampUtil.time()).append(",").append("点击了其他的进行拍照,");
Intent intentElse = new Intent(getActivity(), PhotographActivity.class); Intent intentElse = new Intent(getActivity(), PhotographActivity.class);
File fileElse = PhotoUtils.showPhotoFile("e", latLng); File fileElse = PhotoUtils.showPhotoFile("e", new LatLng(LocationLifeCycle.getInstance().getTencentLocation().getLatitude(), LocationLifeCycle.getInstance().getTencentLocation().getLongitude()));
intentElse.putExtra(Constant.INTENT_PHOTO_PATH, fileElse.getPath()); intentElse.putExtra(Constant.INTENT_PHOTO_PATH, fileElse.getPath());
startActivityForResult(intentElse, 105); startActivityForResult(intentElse, 105);
break; break;

View File

@@ -970,30 +970,32 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
gatherMarker.setVisible(false); gatherMarker.setVisible(false);
} }
PoiEntity poiEntity = (PoiEntity) data.obj; PoiEntity poiEntity = (PoiEntity) data.obj;
Bundle bundle = new Bundle(); if (poiEntity!=null) {
bundle.putSerializable("poiEntity", poiEntity); Bundle bundle = new Bundle();
bundle.putBoolean("isSliding", true); // 通知抽屉不收回 bundle.putSerializable("poiEntity", poiEntity);
switch (poiEntity.getType()) { bundle.putBoolean("isSliding", true); // 通知抽屉不收回
case 1: switch (poiEntity.getType()) {
PoiFragment poiFragment = PoiFragment.newInstance(bundle); case 1:
showSlidingFragment(poiFragment); PoiFragment poiFragment = PoiFragment.newInstance(bundle);
break; showSlidingFragment(poiFragment);
case 2: break;
ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle); case 2:
showSlidingFragment(chargingStationFragment); ChargingStationFragment chargingStationFragment = ChargingStationFragment.newInstance(bundle);
break; showSlidingFragment(chargingStationFragment);
case 3: break;
PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle); case 3:
showSlidingFragment(poiVideoFragment); PoiVideoFragment poiVideoFragment = PoiVideoFragment.newInstance(bundle);
break; showSlidingFragment(poiVideoFragment);
case 4: break;
RoadFragment roadFragment = RoadFragment.newInstance(bundle); case 4:
showSlidingFragment(roadFragment); RoadFragment roadFragment = RoadFragment.newInstance(bundle);
break; showSlidingFragment(roadFragment);
case 5: break;
OtherFragment otherFragment = OtherFragment.newInstance(bundle); case 5:
showSlidingFragment(otherFragment); OtherFragment otherFragment = OtherFragment.newInstance(bundle);
break; showSlidingFragment(otherFragment);
break;
}
} }
frameLayout.setVisibility(View.GONE); frameLayout.setVisibility(View.GONE);
if (gatherGetFragment != null) { if (gatherGetFragment != null) {