Use start location when sort waypoints (if possible)
This commit is contained in:
parent
d7188ba4b5
commit
91efb7041e
2 changed files with 5 additions and 1 deletions
|
@ -155,6 +155,7 @@
|
|||
android:layout_gravity="top|center"
|
||||
android:layout_marginTop="@dimen/map_button_margin"
|
||||
android:background="@drawable/btn_round"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ImageView
|
||||
|
|
|
@ -19,7 +19,6 @@ import net.osmand.util.MapUtils;
|
|||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.app.Application;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnShowListener;
|
||||
|
@ -149,6 +148,10 @@ public class IntermediatePointsDialog {
|
|||
if(cll != null) {
|
||||
LatLon ll = new LatLon(cll.getLatitude(), cll.getLongitude());
|
||||
start = TargetPoint.create(ll, null);
|
||||
} else if(app.getTargetPointsHelper().getPointToStart() != null) {
|
||||
TargetPoint ps = app.getTargetPointsHelper().getPointToStart();
|
||||
LatLon ll = new LatLon(ps.getLatitude(), ps.getLongitude());
|
||||
start = TargetPoint.create(ll, null);
|
||||
// } else if(activity instanceof MapActivity) {
|
||||
// LatLon ll = new LatLon(((MapActivity) activity).getMapView().getLatitude(), ((MapActivity) activity).getMapView().getLongitude());
|
||||
// start = TargetPoint.create(ll, null);
|
||||
|
|
Loading…
Reference in a new issue