Moved routing related stuff to separate package
This commit is contained in:
parent
f5170bdfce
commit
3fbaa75978
15 changed files with 37 additions and 28 deletions
|
@ -3,8 +3,8 @@ package net.osmand.plus;
|
||||||
|
|
||||||
import net.osmand.Version;
|
import net.osmand.Version;
|
||||||
import net.osmand.plus.activities.OsmandApplication;
|
import net.osmand.plus.activities.OsmandApplication;
|
||||||
import net.osmand.plus.activities.RoutingHelper;
|
|
||||||
import net.osmand.plus.activities.SavingTrackHelper;
|
import net.osmand.plus.activities.SavingTrackHelper;
|
||||||
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
import android.app.AlarmManager;
|
import android.app.AlarmManager;
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
|
|
|
@ -14,10 +14,10 @@ import net.osmand.map.TileSourceManager.TileSourceTemplate;
|
||||||
import net.osmand.osm.LatLon;
|
import net.osmand.osm.LatLon;
|
||||||
import net.osmand.plus.activities.ApplicationMode;
|
import net.osmand.plus.activities.ApplicationMode;
|
||||||
import net.osmand.plus.activities.OsmandApplication;
|
import net.osmand.plus.activities.OsmandApplication;
|
||||||
import net.osmand.plus.activities.RouteProvider.RouteService;
|
|
||||||
import net.osmand.plus.activities.search.SearchHistoryHelper;
|
import net.osmand.plus.activities.search.SearchHistoryHelper;
|
||||||
import net.osmand.plus.render.BaseOsmandRender;
|
import net.osmand.plus.render.BaseOsmandRender;
|
||||||
import net.osmand.plus.render.RendererRegistry;
|
import net.osmand.plus.render.RendererRegistry;
|
||||||
|
import net.osmand.plus.routing.RouteProvider.RouteService;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.SharedPreferences.Editor;
|
import android.content.SharedPreferences.Editor;
|
||||||
|
|
|
@ -19,8 +19,10 @@ import net.osmand.plus.FavouritesDbHelper;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.ResourceManager;
|
import net.osmand.plus.ResourceManager;
|
||||||
import net.osmand.plus.activities.RouteProvider.GPXRouteParams;
|
|
||||||
import net.osmand.plus.activities.search.SearchActivity;
|
import net.osmand.plus.activities.search.SearchActivity;
|
||||||
|
import net.osmand.plus.routing.RouteAnimation;
|
||||||
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
|
import net.osmand.plus.routing.RouteProvider.GPXRouteParams;
|
||||||
import net.osmand.plus.views.AnimateDraggingMapThread;
|
import net.osmand.plus.views.AnimateDraggingMapThread;
|
||||||
import net.osmand.plus.views.MapTileLayer;
|
import net.osmand.plus.views.MapTileLayer;
|
||||||
import net.osmand.plus.views.OsmandMapTileView;
|
import net.osmand.plus.views.OsmandMapTileView;
|
||||||
|
|
|
@ -22,7 +22,8 @@ import net.osmand.plus.FavouritesDbHelper;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.ResourceManager;
|
import net.osmand.plus.ResourceManager;
|
||||||
import net.osmand.plus.activities.RouteProvider.GPXRouteParams;
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
|
import net.osmand.plus.routing.RouteProvider.GPXRouteParams;
|
||||||
import net.osmand.plus.views.BaseMapLayer;
|
import net.osmand.plus.views.BaseMapLayer;
|
||||||
import net.osmand.plus.views.MapTileLayer;
|
import net.osmand.plus.views.MapTileLayer;
|
||||||
import net.osmand.plus.views.OsmandMapTileView;
|
import net.osmand.plus.views.OsmandMapTileView;
|
||||||
|
|
|
@ -27,6 +27,7 @@ import net.osmand.plus.ResourceManager;
|
||||||
import net.osmand.plus.SQLiteTileSource;
|
import net.osmand.plus.SQLiteTileSource;
|
||||||
import net.osmand.plus.render.MapRenderRepositories;
|
import net.osmand.plus.render.MapRenderRepositories;
|
||||||
import net.osmand.plus.render.MapVectorLayer;
|
import net.osmand.plus.render.MapVectorLayer;
|
||||||
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
import net.osmand.plus.views.BaseMapLayer;
|
import net.osmand.plus.views.BaseMapLayer;
|
||||||
import net.osmand.plus.views.ContextMenuLayer;
|
import net.osmand.plus.views.ContextMenuLayer;
|
||||||
import net.osmand.plus.views.FavoritesLayer;
|
import net.osmand.plus.views.FavoritesLayer;
|
||||||
|
|
|
@ -23,6 +23,7 @@ import net.osmand.plus.ProgressDialogImplementation;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.ResourceManager;
|
import net.osmand.plus.ResourceManager;
|
||||||
import net.osmand.plus.render.RendererRegistry;
|
import net.osmand.plus.render.RendererRegistry;
|
||||||
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
import net.osmand.plus.voice.CommandPlayer;
|
import net.osmand.plus.voice.CommandPlayer;
|
||||||
import net.osmand.plus.voice.CommandPlayerException;
|
import net.osmand.plus.voice.CommandPlayerException;
|
||||||
import net.osmand.plus.voice.CommandPlayerFactory;
|
import net.osmand.plus.voice.CommandPlayerFactory;
|
||||||
|
|
|
@ -21,8 +21,8 @@ import net.osmand.plus.OsmandSettings.OsmandPreference;
|
||||||
import net.osmand.plus.ProgressDialogImplementation;
|
import net.osmand.plus.ProgressDialogImplementation;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.ResourceManager;
|
import net.osmand.plus.ResourceManager;
|
||||||
import net.osmand.plus.activities.RouteProvider.RouteService;
|
|
||||||
import net.osmand.plus.render.MapRenderRepositories;
|
import net.osmand.plus.render.MapRenderRepositories;
|
||||||
|
import net.osmand.plus.routing.RouteProvider.RouteService;
|
||||||
import net.osmand.plus.views.SeekBarPreference;
|
import net.osmand.plus.views.SeekBarPreference;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
|
|
|
@ -9,8 +9,9 @@ import java.util.List;
|
||||||
import net.osmand.OsmAndFormatter;
|
import net.osmand.OsmAndFormatter;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.RoutingHelper.RouteDirectionInfo;
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
import net.osmand.plus.activities.RoutingHelper.TurnType;
|
import net.osmand.plus.routing.RoutingHelper.RouteDirectionInfo;
|
||||||
|
import net.osmand.plus.routing.RoutingHelper.TurnType;
|
||||||
import net.osmand.plus.views.MapInfoLayer;
|
import net.osmand.plus.views.MapInfoLayer;
|
||||||
import android.app.ListActivity;
|
import android.app.ListActivity;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.routing;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.osmand.LatLonUtils;
|
import net.osmand.LatLonUtils;
|
||||||
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
|
|
||||||
public class RouteAnimation {
|
public class RouteAnimation {
|
|
@ -1,4 +1,4 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.routing;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
@ -28,8 +28,10 @@ import net.osmand.binary.BinaryMapIndexReader;
|
||||||
import net.osmand.osm.LatLon;
|
import net.osmand.osm.LatLon;
|
||||||
import net.osmand.osm.MapUtils;
|
import net.osmand.osm.MapUtils;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.RoutingHelper.RouteDirectionInfo;
|
import net.osmand.plus.activities.ApplicationMode;
|
||||||
import net.osmand.plus.activities.RoutingHelper.TurnType;
|
import net.osmand.plus.activities.OsmandApplication;
|
||||||
|
import net.osmand.plus.routing.RoutingHelper.RouteDirectionInfo;
|
||||||
|
import net.osmand.plus.routing.RoutingHelper.TurnType;
|
||||||
import net.osmand.router.BicycleRouter;
|
import net.osmand.router.BicycleRouter;
|
||||||
import net.osmand.router.BinaryRoutePlanner;
|
import net.osmand.router.BinaryRoutePlanner;
|
||||||
import net.osmand.router.CarRouter;
|
import net.osmand.router.CarRouter;
|
|
@ -1,4 +1,4 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.routing;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -12,9 +12,10 @@ import net.osmand.osm.LatLon;
|
||||||
import net.osmand.osm.MapUtils;
|
import net.osmand.osm.MapUtils;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.RouteProvider.GPXRouteParams;
|
import net.osmand.plus.activities.ApplicationMode;
|
||||||
import net.osmand.plus.activities.RouteProvider.RouteCalculationResult;
|
import net.osmand.plus.routing.RouteProvider.GPXRouteParams;
|
||||||
import net.osmand.plus.activities.RouteProvider.RouteService;
|
import net.osmand.plus.routing.RouteProvider.RouteCalculationResult;
|
||||||
|
import net.osmand.plus.routing.RouteProvider.RouteService;
|
||||||
import net.osmand.plus.voice.CommandPlayer;
|
import net.osmand.plus.voice.CommandPlayer;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.location.Location;
|
import android.location.Location;
|
|
@ -1,7 +1,8 @@
|
||||||
package net.osmand.plus.activities;
|
package net.osmand.plus.routing;
|
||||||
|
|
||||||
import net.osmand.plus.activities.RoutingHelper.RouteDirectionInfo;
|
import net.osmand.plus.activities.ApplicationMode;
|
||||||
import net.osmand.plus.activities.RoutingHelper.TurnType;
|
import net.osmand.plus.routing.RoutingHelper.RouteDirectionInfo;
|
||||||
|
import net.osmand.plus.routing.RoutingHelper.TurnType;
|
||||||
import net.osmand.plus.voice.AbstractPrologCommandPlayer;
|
import net.osmand.plus.voice.AbstractPrologCommandPlayer;
|
||||||
import net.osmand.plus.voice.CommandBuilder;
|
import net.osmand.plus.voice.CommandBuilder;
|
||||||
import net.osmand.plus.voice.CommandPlayer;
|
import net.osmand.plus.voice.CommandPlayer;
|
||||||
|
@ -374,14 +375,14 @@ public class VoiceRouter {
|
||||||
private static class VoiceCommandPending {
|
private static class VoiceCommandPending {
|
||||||
public static final int ROUTE_CALCULATED = 1;
|
public static final int ROUTE_CALCULATED = 1;
|
||||||
public static final int ROUTE_RECALCULATED = 2;
|
public static final int ROUTE_RECALCULATED = 2;
|
||||||
protected final long timestamp;
|
// protected final long timestamp;
|
||||||
protected final int type;
|
protected final int type;
|
||||||
private final VoiceRouter voiceRouter;
|
private final VoiceRouter voiceRouter;
|
||||||
|
|
||||||
public VoiceCommandPending(int type, VoiceRouter voiceRouter){
|
public VoiceCommandPending(int type, VoiceRouter voiceRouter){
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.voiceRouter = voiceRouter;
|
this.voiceRouter = voiceRouter;
|
||||||
timestamp = System.currentTimeMillis();
|
// timestamp = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void play(CommandBuilder newCommand) {
|
public void play(CommandBuilder newCommand) {
|
||||||
|
@ -393,8 +394,6 @@ public class VoiceRouter {
|
||||||
newCommand.routeRecalculated(left).play();
|
newCommand.routeRecalculated(left).play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ import net.osmand.OsmAndFormatter;
|
||||||
import net.osmand.osm.LatLon;
|
import net.osmand.osm.LatLon;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.RoutingHelper.RouteDirectionInfo;
|
import net.osmand.plus.routing.RoutingHelper.RouteDirectionInfo;
|
||||||
import net.osmand.plus.activities.RoutingHelper.TurnType;
|
import net.osmand.plus.routing.RoutingHelper.TurnType;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
|
|
|
@ -3,10 +3,10 @@ package net.osmand.plus.views;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.RoutingHelper;
|
|
||||||
import net.osmand.plus.activities.ShowRouteInfoActivity;
|
import net.osmand.plus.activities.ShowRouteInfoActivity;
|
||||||
import net.osmand.plus.activities.RoutingHelper.IRouteInformationListener;
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
import net.osmand.plus.activities.RoutingHelper.RouteDirectionInfo;
|
import net.osmand.plus.routing.RoutingHelper.IRouteInformationListener;
|
||||||
|
import net.osmand.plus.routing.RoutingHelper.RouteDirectionInfo;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
||||||
|
|
||||||
import net.osmand.LogUtil;
|
import net.osmand.LogUtil;
|
||||||
import net.osmand.osm.MapUtils;
|
import net.osmand.osm.MapUtils;
|
||||||
import net.osmand.plus.activities.RoutingHelper;
|
import net.osmand.plus.routing.RoutingHelper;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
|
|
Loading…
Reference in a new issue