Fix
This commit is contained in:
parent
6d983058c8
commit
9c6b3c2d1c
6 changed files with 17 additions and 12 deletions
|
@ -100,9 +100,8 @@
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<sync todir="assets/help/">
|
<sync todir="assets/help/">
|
||||||
<fileset dir="../../help/help">
|
<fileset dir="../../help/website/help">
|
||||||
<include name="*.html" />
|
<include name="*.html" />
|
||||||
<include name="images/**/*.png" />
|
|
||||||
</fileset>
|
</fileset>
|
||||||
</sync>
|
</sync>
|
||||||
<copy todir="assets/help">
|
<copy todir="assets/help">
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
|
||||||
package net.osmand.plus;
|
package net.osmand.plus;
|
||||||
|
|
||||||
|
import gnu.trove.list.array.TIntArrayList;
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
|
@ -553,6 +555,7 @@ public class GPXUtilities {
|
||||||
public List<Track> tracks = new ArrayList<Track>();
|
public List<Track> tracks = new ArrayList<Track>();
|
||||||
public List<WptPt> points = new ArrayList<WptPt>();
|
public List<WptPt> points = new ArrayList<WptPt>();
|
||||||
public List<Route> routes = new ArrayList<Route>();
|
public List<Route> routes = new ArrayList<Route>();
|
||||||
|
|
||||||
public String warning = null;
|
public String warning = null;
|
||||||
public String path = "";
|
public String path = "";
|
||||||
public boolean showCurrentTrack;
|
public boolean showCurrentTrack;
|
||||||
|
|
|
@ -296,10 +296,6 @@ public class IntermediatePointsDialog {
|
||||||
app.getTargetPointsHelper().removeWayPoint(cnt == 0, i);
|
app.getTargetPointsHelper().removeWayPoint(cnt == 0, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// FIXME delete location when point is removed
|
|
||||||
// if(mapActivity instanceof MapActivity) {
|
|
||||||
// ((MapActivity) mapActivity).getMapLayers().getContextMenuLayer().setLocation(null, "");
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,22 +144,29 @@ public class MapActivityActions implements DialogProvider {
|
||||||
builder.create().show();
|
builder.create().show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void directionTo(double latitude, double longitude) {
|
public void directionTo(double latitude, double longitude, PointDescription pd) {
|
||||||
final TargetPointsHelper targets = getMyApplication().getTargetPointsHelper();
|
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);
|
enterRoutePlanningMode(null, null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addAsWaypoint(double latitude, double longitude) {
|
public void addAsWaypoint(double latitude, double longitude, PointDescription pd) {
|
||||||
TargetPointsHelper targets = getMyApplication().getTargetPointsHelper();
|
TargetPointsHelper targets = getMyApplication().getTargetPointsHelper();
|
||||||
boolean destination = (targets.getPointToNavigate() == null);
|
boolean destination = (targets.getPointToNavigate() == null);
|
||||||
|
|
||||||
targets.navigateToPoint(new LatLon(latitude, longitude), true,
|
targets.navigateToPoint(new LatLon(latitude, longitude), true,
|
||||||
destination ? -1 : targets.getIntermediatePoints().size(),
|
destination ? -1 : targets.getIntermediatePoints().size(),
|
||||||
mapActivity.getContextMenu().getPointDescription());
|
pd);
|
||||||
|
|
||||||
openIntermediateEditPointsDialog();
|
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() {
|
public void editWaypoints() {
|
||||||
openIntermediateEditPointsDialog();
|
openIntermediateEditPointsDialog();
|
||||||
|
|
|
@ -351,7 +351,8 @@ public class MapContextMenu extends MenuTitleController {
|
||||||
if (pointDescription.isDestination()) {
|
if (pointDescription.isDestination()) {
|
||||||
mapActivity.getMapActions().editWaypoints();
|
mapActivity.getMapActions().editWaypoints();
|
||||||
} else {
|
} else {
|
||||||
mapActivity.getMapActions().addAsWaypoint(latLon.getLatitude(), latLon.getLongitude());
|
mapActivity.getMapActions().addAsTarget(latLon.getLatitude(), latLon.getLongitude(),
|
||||||
|
pointDescription);
|
||||||
}
|
}
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ public class PoiSubTypeDialogFragment extends DialogFragment {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||||
final Amenity a = (Amenity) getArguments().getSerializable(KEY_AMENITY);
|
final Amenity a = (Amenity) getArguments().getSerializable(KEY_AMENITY);
|
||||||
final Map<String, PoiType> allTranslatedNames = poiTypes.getAllTranslatedNames(a.getType(), true);
|
final Map<String, PoiType> allTranslatedNames = poiTypes.getAllTranslatedNames(a.getType(), true);
|
||||||
// (=^.^=)
|
|
||||||
Set<String> strings = allTranslatedNames.keySet();
|
Set<String> strings = allTranslatedNames.keySet();
|
||||||
final String[] subCats = strings.toArray(new String[strings.size()]);
|
final String[] subCats = strings.toArray(new String[strings.size()]);
|
||||||
builder.setItems(subCats, new DialogInterface.OnClickListener() {
|
builder.setItems(subCats, new DialogInterface.OnClickListener() {
|
||||||
|
|
Loading…
Reference in a new issue