This commit is contained in:
Victor Shcherb 2015-11-11 19:45:54 +01:00
parent 6d983058c8
commit 9c6b3c2d1c
6 changed files with 17 additions and 12 deletions

View file

@ -100,9 +100,8 @@
</fileset>
</copy>
<sync todir="assets/help/">
<fileset dir="../../help/help">
<fileset dir="../../help/website/help">
<include name="*.html" />
<include name="images/**/*.png" />
</fileset>
</sync>
<copy todir="assets/help">

View file

@ -1,6 +1,8 @@
package net.osmand.plus;
import gnu.trove.list.array.TIntArrayList;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
@ -553,6 +555,7 @@ public class GPXUtilities {
public List<Track> tracks = new ArrayList<Track>();
public List<WptPt> points = new ArrayList<WptPt>();
public List<Route> routes = new ArrayList<Route>();
public String warning = null;
public String path = "";
public boolean showCurrentTrack;

View file

@ -296,10 +296,6 @@ public class IntermediatePointsDialog {
app.getTargetPointsHelper().removeWayPoint(cnt == 0, i);
}
}
// FIXME delete location when point is removed
// if(mapActivity instanceof MapActivity) {
// ((MapActivity) mapActivity).getMapLayers().getContextMenuLayer().setLocation(null, "");
// }
}
}
}

View file

@ -144,22 +144,29 @@ public class MapActivityActions implements DialogProvider {
builder.create().show();
}
public void directionTo(double latitude, double longitude) {
public void directionTo(double latitude, double longitude, PointDescription pd) {
final TargetPointsHelper targets = getMyApplication().getTargetPointsHelper();
targets.navigateToPoint(new LatLon(latitude, longitude), true, -1, null);
targets.navigateToPoint(new LatLon(latitude, longitude), true, -1, pd);
enterRoutePlanningMode(null, null, false);
}
public void addAsWaypoint(double latitude, double longitude) {
public void addAsWaypoint(double latitude, double longitude, PointDescription pd) {
TargetPointsHelper targets = getMyApplication().getTargetPointsHelper();
boolean destination = (targets.getPointToNavigate() == null);
targets.navigateToPoint(new LatLon(latitude, longitude), true,
destination ? -1 : targets.getIntermediatePoints().size(),
mapActivity.getContextMenu().getPointDescription());
pd);
openIntermediateEditPointsDialog();
}
public void addAsTarget(double latitude, double longitude, PointDescription pd) {
TargetPointsHelper targets = getMyApplication().getTargetPointsHelper();
targets.navigateToPoint(new LatLon(latitude, longitude), true, -1,
pd);
openIntermediateEditPointsDialog();
}
public void editWaypoints() {
openIntermediateEditPointsDialog();

View file

@ -351,7 +351,8 @@ public class MapContextMenu extends MenuTitleController {
if (pointDescription.isDestination()) {
mapActivity.getMapActions().editWaypoints();
} else {
mapActivity.getMapActions().addAsWaypoint(latLon.getLatitude(), latLon.getLongitude());
mapActivity.getMapActions().addAsTarget(latLon.getLatitude(), latLon.getLongitude(),
pointDescription);
}
close();
}

View file

@ -26,7 +26,6 @@ public class PoiSubTypeDialogFragment extends DialogFragment {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
final Amenity a = (Amenity) getArguments().getSerializable(KEY_AMENITY);
final Map<String, PoiType> allTranslatedNames = poiTypes.getAllTranslatedNames(a.getType(), true);
// (=^.^=)
Set<String> strings = allTranslatedNames.keySet();
final String[] subCats = strings.toArray(new String[strings.size()]);
builder.setItems(subCats, new DialogInterface.OnClickListener() {