public class RouteMapReceiver
extends android.content.BroadcastReceiver
implements android.content.SharedPreferences.OnSharedPreferenceChangeListener
Modifier and Type | Class and Description |
---|---|
protected static class |
RouteMapReceiver.RouteDropDownReceiver |
Modifier and Type | Field and Description |
---|---|
android.content.Context |
_context |
MapView |
_mapView |
protected RouteNavigator |
_navigator |
protected RoutePlannerView |
_plannerView |
static java.lang.String |
ACTION_ROUTE_IMPORT_FINISHED |
static java.lang.String |
ADD_PT_FROM_BEARING |
static java.lang.String |
DELETE_ACTION |
static java.lang.String |
EDIT_CUES_ACTION |
static java.lang.String |
END_NAV |
static java.lang.String |
EXTRA_ROUTE_IS_NEW |
static java.lang.String |
EXTRA_ROUTE_TITLE |
static java.lang.String |
EXTRA_ROUTE_TYPE |
static java.lang.String |
EXTRA_ROUTE_UID |
static java.lang.String |
EXTRA_ROUTE_UPDATED |
static java.lang.String |
INSERT_WAYPOINT |
static java.lang.String |
MANAGE_ACTION |
static java.lang.String |
POINTS_CHANGED_ACTION |
static java.lang.String |
PROCESSING_DONE |
static java.lang.String |
ROUTE_EXPORT |
static java.lang.String |
ROUTE_IMPORT |
static java.lang.String |
ROUTE_TRANSFER |
static java.lang.String |
SHARE_ACTION |
static java.lang.String |
SHOW_ACTION |
static java.lang.String |
SHOW_EDIT_ACTION |
static java.lang.String |
START_NAV |
static java.lang.String |
UNDO |
Constructor and Description |
---|
RouteMapReceiver(MapView mapView,
MapGroup routeGroup,
MapGroup waypointGroup,
MapGroup navGroup,
android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
void |
createReversedRoute(Route route,
java.lang.String newUID,
RoutePlannerInterface rpi,
boolean includeCP,
boolean showDetails)
Constructs a reverse route of the existing route utilizing a planner
|
void |
dimRoutes(boolean state) |
void |
dimRoutes(Route excluded,
boolean state,
boolean stopTouch) |
void |
dimRoutes(java.lang.String excludedUID,
boolean state,
boolean stopTouch)
Dim or Undim all routes, except for the route specified
|
void |
dispose() |
java.util.ArrayList<Route> |
getCompleteRoutes() |
static RouteMapReceiver |
getInstance() |
Route |
getNewRoute(java.lang.String uid) |
android.content.SharedPreferences |
getPreferences() |
protected Route |
getRoute(java.lang.String routeUID)
Find the route based on it's UID.
|
MapGroup |
getRouteGroup() |
Route |
getRouteWithName(java.lang.String name)
Returns first route with the given name, null if no such route exists
|
Route |
getRouteWithPoint(PointMapItem item) |
MapGroup |
getWaypointGroup()
Retrieve the map group for waypoints associated with all routes.
|
boolean |
isNavigating() |
static boolean |
isNetworkAvailable()
Perform a non invasive test to see if the network is available for
the purpose of Route Lookup.
|
void |
mirrorImage(Route route,
java.lang.String newUID)
Constructs a complete mirror image of the route without doing much.
|
void |
onReceive(android.content.Context ignoreCtx,
android.content.Intent intent) |
void |
onSharedPreferenceChanged(android.content.SharedPreferences prefs,
java.lang.String key) |
static Route |
promptPlanRoute(MapView mapView,
GeoPoint start,
GeoPoint end,
java.lang.String name,
int color)
Quick way to call into the Plan route mechanism using an existing start and end point with the route name and color.
|
static void |
promptPlanRoute(MapView _mapView,
PointMapItem origin,
PointMapItem dest,
Route _route,
boolean entireRoute)
Allows for external parties to call a route planner given two points and a route to fill.
|
static void |
showManageRoutes() |
void |
showRouteDetails(Route route) |
void |
showRouteDetails(Route route,
RoutePlannerInterface autoPlan,
boolean edit)
Show route details drop-down
|
static void |
startEdit(java.lang.String uid) |
void |
toggleTouchEvents(Route excluded,
boolean stopTouch) |
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
public static final java.lang.String DELETE_ACTION
public static final java.lang.String SHOW_ACTION
public static final java.lang.String SHARE_ACTION
public static final java.lang.String SHOW_EDIT_ACTION
public static final java.lang.String EDIT_CUES_ACTION
public static final java.lang.String MANAGE_ACTION
public static final java.lang.String START_NAV
public static final java.lang.String END_NAV
public static final java.lang.String INSERT_WAYPOINT
public static final java.lang.String ADD_PT_FROM_BEARING
public static final java.lang.String ROUTE_IMPORT
public static final java.lang.String ROUTE_TRANSFER
public static final java.lang.String ROUTE_EXPORT
public static final java.lang.String UNDO
public static final java.lang.String PROCESSING_DONE
public static final java.lang.String POINTS_CHANGED_ACTION
public static final java.lang.String ACTION_ROUTE_IMPORT_FINISHED
public static final java.lang.String EXTRA_ROUTE_UID
public static final java.lang.String EXTRA_ROUTE_IS_NEW
public static final java.lang.String EXTRA_ROUTE_TITLE
public static final java.lang.String EXTRA_ROUTE_TYPE
public static final java.lang.String EXTRA_ROUTE_UPDATED
public final android.content.Context _context
public final MapView _mapView
protected RoutePlannerView _plannerView
protected final RouteNavigator _navigator
public static RouteMapReceiver getInstance()
public void dispose()
public MapGroup getRouteGroup()
public android.content.SharedPreferences getPreferences()
public boolean isNavigating()
public static boolean isNetworkAvailable()
public void onSharedPreferenceChanged(android.content.SharedPreferences prefs, java.lang.String key)
onSharedPreferenceChanged
in interface android.content.SharedPreferences.OnSharedPreferenceChangeListener
public java.util.ArrayList<Route> getCompleteRoutes()
protected Route getRoute(java.lang.String routeUID)
routeUID
- public Route getRouteWithName(java.lang.String name)
name
- public Route getNewRoute(java.lang.String uid)
public MapGroup getWaypointGroup()
public void onReceive(android.content.Context ignoreCtx, android.content.Intent intent)
onReceive
in class android.content.BroadcastReceiver
public static void startEdit(java.lang.String uid)
public Route getRouteWithPoint(PointMapItem item)
public static void showManageRoutes()
public void showRouteDetails(Route route, RoutePlannerInterface autoPlan, boolean edit)
route
- Route to show details forautoPlan
- The route planner interface to use if this route
is being created in automatic modepublic void showRouteDetails(Route route)
public void dimRoutes(java.lang.String excludedUID, boolean state, boolean stopTouch)
excludedUID
- The UID of the route that isn't dimmed
Pass null to dim allstate
- to dim or undim all routespublic void dimRoutes(Route excluded, boolean state, boolean stopTouch)
public void dimRoutes(boolean state)
public void toggleTouchEvents(Route excluded, boolean stopTouch)
public void mirrorImage(Route route, java.lang.String newUID)
public void createReversedRoute(Route route, java.lang.String newUID, RoutePlannerInterface rpi, boolean includeCP, boolean showDetails)
public static Route promptPlanRoute(MapView mapView, GeoPoint start, GeoPoint end, java.lang.String name, int color)
mapView
- the mapView required for this to workstart
- the start geopoint.end
- the end geopointname
- name of the routecolor
- color of the route.public static void promptPlanRoute(MapView _mapView, PointMapItem origin, PointMapItem dest, Route _route, boolean entireRoute)
_mapView
- the mapView that is required for the proper function of the method.origin
- must exist as part of the _routedest
- must exist as part of the _route_route
- the route to utilize when performing rerouting of part of all of the routeentireRoute
- boolean to express that the entire route is being used despite the origin and destination being supplied.