Change map center in plan route mode in landscape
This commit is contained in:
parent
f8fb7279d6
commit
c910b7127f
1 changed files with 10 additions and 0 deletions
|
@ -65,6 +65,8 @@ import java.util.Map;
|
||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
|
|
||||||
|
import static net.osmand.plus.OsmandSettings.LANDSCAPE_MIDDLE_RIGHT_CONSTANT;
|
||||||
|
|
||||||
public class PlanRouteFragment extends Fragment {
|
public class PlanRouteFragment extends Fragment {
|
||||||
|
|
||||||
public static final String TAG = "PlanRouteFragment";
|
public static final String TAG = "PlanRouteFragment";
|
||||||
|
@ -436,6 +438,12 @@ public class PlanRouteFragment extends Fragment {
|
||||||
}
|
}
|
||||||
setupAppModesBtn();
|
setupAppModesBtn();
|
||||||
|
|
||||||
|
OsmandMapTileView tileView = mapActivity.getMapView();
|
||||||
|
previousMapPosition = tileView.getMapPosition();
|
||||||
|
if (!portrait) {
|
||||||
|
tileView.setMapPosition(LANDSCAPE_MIDDLE_RIGHT_CONSTANT);
|
||||||
|
}
|
||||||
|
|
||||||
selectedCount = mapActivity.getMyApplication().getMapMarkersHelper().getSelectedMarkersCount();
|
selectedCount = mapActivity.getMyApplication().getMapMarkersHelper().getSelectedMarkersCount();
|
||||||
recreateSnapTrkSegment();
|
recreateSnapTrkSegment();
|
||||||
mapActivity.refreshMap();
|
mapActivity.refreshMap();
|
||||||
|
@ -491,6 +499,8 @@ public class PlanRouteFragment extends Fragment {
|
||||||
mapActivity.findViewById(R.id.snap_to_road_image_button).setVisibility(View.GONE);
|
mapActivity.findViewById(R.id.snap_to_road_image_button).setVisibility(View.GONE);
|
||||||
mainView.findViewById(R.id.snap_to_road_progress_bar).setVisibility(View.GONE);
|
mainView.findViewById(R.id.snap_to_road_progress_bar).setVisibility(View.GONE);
|
||||||
|
|
||||||
|
mapActivity.getMapView().setMapPosition(previousMapPosition);
|
||||||
|
|
||||||
cancelSnapToRoad();
|
cancelSnapToRoad();
|
||||||
markersLayer.setRoute(null);
|
markersLayer.setRoute(null);
|
||||||
mapActivity.refreshMap();
|
mapActivity.refreshMap();
|
||||||
|
|
Loading…
Reference in a new issue