add move to marker

This commit is contained in:
lixiaopeng
2020-01-20 10:37:19 +08:00
parent d6c4059ecb
commit de2da9e7e5

View File

@@ -380,6 +380,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
}
Log.d(TAG, "onMarkerClicked 自己打点数据 currentPosition = " + currentPosition);
handleMarkerExploreWay(markerExploreWayList.get(currentPosition));
} else { //大而全数据
double lat = exploreWay.getLocation().getLat();
for (int i = 0; i < markerExploreWayList.size(); i++) {
@@ -578,6 +579,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
Log.d(TAG, " tv_previous_res --2-> currentPosition = " + currentPosition + " >> size= " + markerExploreWayList.size());
if (markerExploreWayList.size() > currentPosition && currentPosition >= 0) {
handleData(markerExploreWayList.get(currentPosition));
moveToMarcker(markerExploreWayList.get(currentPosition).getLocation().getLat(), markerExploreWayList.get(currentPosition).getLocation().getLon());
}
} else if (id == R.id.tv_next_res) { //下一个
//判断是图片还是视频,最后一个时,下一个不可点击
@@ -589,12 +591,21 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
Log.d(TAG, " tv_next_res --2-> currentPosition = " + currentPosition + " >> size= " + markerExploreWayList.size());
if (markerExploreWayList.size() > currentPosition) {
handleData(markerExploreWayList.get(currentPosition));
moveToMarcker(markerExploreWayList.get(currentPosition).getLocation().getLat(), markerExploreWayList.get(currentPosition).getLocation().getLon());
}
} else if (id == R.id.tv_main_empty) { //上报路况
sendShareReceiver("1");
}
}
private void moveToMarcker(double lat, double lon) {
MogoLatLng latLng = new MogoLatLng(lat, lon);
mMApUIController.moveToCenter(latLng);
}
/**
* 执行图片动画
*/
@@ -1040,8 +1051,7 @@ public class TanluCardViewFragment extends MvpFragment<IView, Presenter<IView>>
String cityCode = TanluServiceHandler.getLocationClient().getLastKnowLocation().getCityCode();
//移动到具体位置
mMogoStatusManager.setUserInteractionStatus(TanluConstants.MODEL_NAME, true, true);
MogoLatLng latLng = new MogoLatLng(lat, lon);
mMApUIController.moveToCenter(latLng);
moveToMarcker(lat, lon);
inputlon = lon;
inputlat = lat;