GuidanceMgr - Navigation (CPIK Libraries)
Contents
GuidanceMgr.getCurrentPosition
Overview | |
---|---|
Description | Provides information relating to CoPilot’s current or last known location. This will include coordinates as well as other location information detailing the quality of the GPS fix and the number of satellites contributing to the current GPS fix. Note: The last known position will be returned when the current location cannot be determined. This could potentially be from a previous run of the application, depending when this API is used. An object that contains data related to a trip’s itinerary. This information, provided by CoPilot, includes turn instructions, turn images and distances. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
A PositionInfo object populated with data pertaining to CoPilot’s current or last known position.
Sample Code
GuidanceMgr.getLaneAssist
Overview | |
---|---|
Description | Returns a LaneAssistInfo object representing the current lane assist information. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
A LaneAssistInfo object with the current lane assist information.
Sample Code
GuidanceMgr.getTurnInstruction
Overview | |
---|---|
Description | Gets information about the upcoming turn instruction. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
A TurnInstruction object that contains the information about the upcoming turn.
Sample Code
GuidanceMgr.getDistanceToDestination
Overview | |
---|---|
Description | Provides the distance from the current location to the destination that has been entered into CoPilot. This will be returned in miles or kilometers depending on the settings. If CoPilot has not been started, an error will be returned. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
The distance remaining to the destination. This distance will be in miles if CoPilot is set to use imperial measurements or meters if CoPilot is set to use metric measurements.
Sample Code
GuidanceMgr.getCurrentRoad
Overview | |
---|---|
Description | Gets information about the current road. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
A Road object containing information about the current road.
Sample Code
GuidanceMgr.getRouteCoordinates
Overview | |
---|---|
Description | Gets a list of coordinates that describe the current guidance route. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Parameters
Boolean bFromCurrentPosition - True if requesting only the points starting from the current position on the route. False if requesting the entire route.
Double dLookAhead – The distance in miles to look ahead on the route.
Double dGranularity – A value between 0.0 and 1.0 that will indicate how coarse the returned list of Coordinates will be. A value of 1.0 will return the finest possible route.
Return Value
An ArrayList object that contains the list of Coordinate objects that represents the route.
Sample Code
GuidanceMgr.getRouteTmcCodes
Overview | |
---|---|
Description | Gets a list of TMC location codes that describe the current guidance route. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
An ArrayList object that contains the list of TMC location codes describing the current route.
Sample Code
GuidanceMgr.getRouteTmcCodes (No duplicates)
Overview | |
---|---|
Description | Gets a list of TMC location codes that describe the current guidance route, with the ability to remove duplicates from the list. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | Android, Linux |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Parameters
bRemoveDuplicates – True if the duplicates should be removed from the returned list.
Return Value
An ArrayList object that contains the list of TMC location codes describing the current route.
Sample Code
GuidanceMgr.getCurrentSafetyCamera
Overview | |
---|---|
Description | Gets the current Safety Camera info, if it exists. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
A SafetyCamera object that contains information about the safety camera that is currently displayed on the CoPilot guidance map.
Sample Code
GuidanceMgr.getETA
Overview | |
---|---|
Description | Provides details of the current estimated time of arrival (ETA) for the first destination of the trip that CoPilot is navigating. If CoPilot has not yet started or does not have a destination entered, an exception will be thrown. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | Android, Linux |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
A Date object indicating the estimated time of arrival.
Sample Code
GuidanceMgr.getItineraryInfoList
Overview | |
---|---|
Description | Returns the full itinerary currently stored within CoPilot. Itinerary information will be passed back via onItineraryUpdate. A subsequent onItineraryUpdate will be returned after any of the following events: - Route calculation finish - Route is finished - Refresh of the route calculation dialog - Current segment (link) is changed - Any Detour - Penalty added to link/segment (traffic received) - Penalty removed from link/segment (traffic is cleared) - Update itinerary report in case language or distance unit changed - Trip is changed |
Supported on Android Since Version | 9.6.0.1848 |
Supported on iOS Since Version | 10.9 |
Type | Class |
Package | com.alk.cpik.guidance |
Methods
Return Value
A list representing each ItineraryInfo object.
Sample Code
GuidanceMgr.getGPSDevice
Overview | |
---|---|
Description | Gets the CoPilot GPS Device used to manually push GPS Coordinates or NMEA sentences. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
Singleton instance of the CoPilot GPS Device.
Sample Code
GuidanceMgr.enableEarlyTurnWarning
Overview | |
---|---|
Description | Enables the early turn warning that occurs at 2 miles or 2 kilometers before the turn. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Sample Code
GuidanceMgr.isEarlyTurnWarningEnabled
Overview | |
---|---|
Description | Checks whether or not the early turn warning, which occurs at 2 miles or 2 kilometers before the turn, is enabled. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
Boolean - True if the early turn warning is enabled. False otherwise.
Sample Code
GuidanceMgr.enableNearTurnWarning
Overview | |
---|---|
Description | Enables the near turn warning that occurs at .5 kilometers or .5 miles before the turn. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Sample Code
GuidanceMgr.isNearTurnWarningEnabled
Overview | |
---|---|
Description | Checks whether or not the near turn warning, which occurs at .5 kilometers or .5 miles before the turn, is enabled. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
Boolean – True if the near turn warning is enabled. False otherwise.
Sample Code
GuidanceMgr.enableFarTurnWarning
Overview | |
---|---|
Description | Enables the far turn warning that occurs at 1 kilometer or 1 mile before the turn. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | Android, Linux |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Sample Code
GuidanceMgr.isFarTurnWarningEnabled
Overview | |
---|---|
Description | Checks whether or not the far turn warning, which occurs at 1 kilometer or 1 mile before the turn, is enabled. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | Android, Linux |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
Boolean true if the near turn warning is enabled. False otherwise.
Sample Code
GuidanceMgr.enableTurnRestrictions
Overview | |
---|---|
Description | Enables or disables turn restrictions - signs in the map view to show the driver where any restricted turns (e.g. no left or no right turn) are along the route. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Parameters
Boolean true to enable turn restrictions. False to disable turn restrictions.
Sample Code
GuidanceMgr.isTurnRestrictionEnabled
Overview | |
---|---|
Description | Checks to see whether turn restrictions are enabled or disabled. Turn restrictions are signs in the map view to show the driver where any restricted turns (e.g. no left or no right turn) are along the route. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
Boolean - True if the feature is enabled. False otherwise.
Sample Code
GuidanceMgr.enableClearTurnView
Overview | |
---|---|
Description | Enables or disables the ClearTurn feature, which displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Parameters
Enable - Boolean true to enable ClearTurn. False to disable ClearTurn.
Sample Code
GuidanceMgr.isClearTurnViewEnabled
Overview | |
---|---|
Description | Checks to see whether ClearTurn is enabled or disabled. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | Android, Linux |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
Boolean - True if the feature is enabled. False otherwise.
Sample Code
GuidanceMgr.enableClearTurnViewOnlyForHighways
Overview | |
---|---|
Description | Enables or disables the ClearTurn feature only for highways. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Parameters
Boolean - True to enable ClearTurn. False to disable ClearTurn.
Return Value
GuidanceMgr.isClearTurnViewEnabledOnlyForHighways
Overview | |
---|---|
Description | Checks whether or not ClearTurn is set to show only for highways. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | Android, Linux |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
Boolean - True if the feature is enabled. False otherwise.
Sample Code
GuidanceMgr.setClearTurnInstructionDrawDistance
Overview | |
---|---|
Description | Sets the distance from the turn at which ClearTurn views will draw. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | Android, Linux |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Parameters
Integer distance measure in 1/10 of a mile or 1/10 of a kilometer.
Sample Code
GuidanceMgr.getClearTurnInstructionDrawDistance
Overview | |
---|---|
Description | Retrieves the distance at which ClearTurn view will draw. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits. |
Supported on Android Since Version | 9.6.0.868 |
Supported on Android Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
Integer distance at which Clear Turn will draw in 1/10 of a mile or 1/10 of a kilometer, depending on CoPilot’s unit setting.
Sample Code
GuidanceMgr.setClearTurnInstructionHideDistance
Overview | |
---|---|
Description | Sets the distance from the turn at which ClearTurn views will hide. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Parameters
Integer distance at which ClearTurn views will hide in 1/10 of a mile or 1/10 a kilometer.
Sample Code
GuidanceMgr.getClearTurnInstructionHideDistance
Overview | |
---|---|
Description | Retrieves the distance at which the ClearTurn view will be hidden. ClearTurn displays a realistic view of a turn ahead, with lane indicator arrows and signposts at major junctions and exits. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
Integer distance at which the ClearTurn view will be hidden in 1/10 of a mile or 1/10 of a kilometer.
Sample Code
GuidanceMgr.showTurnAfterNext
Overview | |
---|---|
Description | Enables or disables the display of the turn after the approaching turn. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Parameters
Boolean - True to enable the feature. False to disable.
Sample Code
GuidanceMgr.isTurnAfterNextEnabled
Overview | |
---|---|
Description | Checks whether or not the turn after the approaching turn will display. |
Supported on Android Since Version | 9.6.0.868 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Return Value
Boolean - True if the feature is enabled. False otherwise.
Sample Code
GuidanceMgr.suspendNavigation
Overview | |
---|---|
Description | Suspends navigation. When this API is called, the position on the map will not update and guidance will stop until re-enabled. This is meant to reduce CPU usage at times when navigation is not necessary. GuidanceMgr.getCurrentRoad() will continue to work as expected. This API differs from CopilotMgr.enableGPS() / CopilotMgr.disableGPS()(Android only) in that the GPS device itself will remain open and the current position will be updated for the GuidanceMgr.getCurrentRoad() API. |
Supported on Android Since Version | 9.6.0.1453 |
Supported on iOS Since Version | 10.9 |
Type | Method |
Package | com.alk.cpik.guidance |
Syntax
Parameters
bSuspend - true to suspend navigation, or false to re-enable navigation.
Sample Code
ChevronDisplayType
Overview | |
---|---|
Description | An enum of the information displayed beneath the chevron in CoPilot during guidance. The chevron is the arrow or dot displayed on the map to indicate the current position. |
Supported on Android Since Version | 9.6.0.821 |
Type | Enum |
Package | com.alk.cpik.guidance |
Values
Value | Description |
---|---|
NONE | Nothing is Displayed. |
CURRENT_ROAD | Display the current road. |
DESTINATION | Display the destination. |
NEAREST_TOWN | Display the nearest town. |
Heading | Display the current heading. |
LAT_LON | Display the current latitude/longitude position. |
DriveSide
Overview | |
---|---|
Description | An enum of the side of the road on which a country drives. |
Supported on Android Since Version | 9.6.0.821 |
Type | Enum |
Package | com.alk.cpik.trip |
Values
Value | Description |
---|---|
DRIVE_SIDE_UNAVAILABLE | Drive side information for the country is unavailable. |
DRIVE_SIDE_LEFT | A country in which they drive on the left side of the road. |
DRIVE_SIDE_RIGHT | A country in which they drive on the right side of the road. |
UnitsOfMeasure
Overview | |
---|---|
Description | An enum that provides details on units of measurement. |
Supported on Android Since Version | 9.6.0.821 |
Type | Enum |
Package | com.alk.cpik.trip |
Values
Value | Description |
---|---|
UNAVAILABLE | Units of measure are unavailable |
METRIC | Metric units of measure |
IMPERIAL | Imperial units of measure |
Hooks and Callbacks
CPUnitsOfMeasure
Overview | |
---|---|
Description | An enum that provides details on units of measurement. |
Supported on iOS Since Version | 10.9 |
Type | Enum |
Package | com.alk.cpik.trip |
Values
Value | Description |
---|---|
CP_UNAVAILABLE | Units of measure are unavailable |
CP_METRIC | Metric units of measure |
CP_IMPERIAL | Imperial units of measure |
SpeedLimitWarningThreshold
Overview | |
---|---|
Description | An enum of the speed by which the driver must exceed the speed limit to receive a warning. |
Supported on Android Since Version | 9.6.0.821 |
Type | Enum |
Package | com.alk.cpik.trip |
Values
Value | Description |
---|---|
LEVEL_0 | Exceeding the speed limit by 5 mph/kph |
LEVEL_1 | Exceeding the speed limit by 10 mph/kph |
LEVEL_2 | Exceeding the speed limit by 15 mph/kph |
LEVEL_3 | Exceeding the speed limit by 20 mph/kph |
LEVEL_4 | Exceeding the speed limit by 25 mph/kph |
LEVEL_5 | Exceeding the speed limit by 30 mph/kph |
AlertRange
Overview | |
---|---|
Description | An enum of the proximity to a safety camera at which the driver will be alerted. |
Supported on Android Since Version | 9.6.0.821 |
Type | Enum |
Package | com.alk.cpik.trip |
Values
Value | Description |
---|---|
SHORT_RANGE | This represent short range alert. |
MEDIUM_RANGE | This represent medium range alert. |
LONG_RANGE | This represent long range alert. |
TurnArrowImage
Overview | |
---|---|
Description | An enum of the turn arrow images used by CoPilot. |
Supported on Android Since Version | 9.6.0.821 |
Platforms Supported | Android, Linux |
Type | Enum |
Package | com.alk.cpik.trip |
Values
ID | Value | V9 Image | V10 Image |
---|---|---|---|
NONE | |||
0 | STRAIGHT | ||
1 | TURN_LEFT | ||
2 | TURN_RIGHT | ||
3 | SLIGHT_LEFT | ||
4 | SLIGHT_RIGHT | ||
5 | SHARP_LEFT | ||
6 | SHARP_RIGHT | ||
7 | LEFTSIDE_UTURN | ||
8 | WAYPOINT_FLAG | ||
9 | START_POINT_FLAG | ||
10 | END_POINT_FLAG | ||
11 | ROUNDABOUT_LEFTSIDE_STRAIGHT | ||
12 | ROUNDABOUT_LEFTSIDE_LEFT | ||
13 | ROUNDABOUT_LEFTSIDE_RIGHT | ||
14 | ROUNDABOUT_LEFTSIDE_SLIGHT_LEFT | ||
15 | ROUNDABOUT_LEFTSIDE_SLIGHT_RIGHT | ||
16 | ROUNDABOUT_LEFTSIDE_SHARP_LEFT | ||
17 | ROUNDABOUT_LEFTSIDE_SHARP_RIGHT | ||
18 | ROUNDABOUT_LEFTSIDE_UTURN | ||
19 | ROUNDABOUT_RIGHTSIDE_STRAIGHT | ||
20 | ROUNDABOUT_RIGHTSIDE_LEFT | ||
21 | ROUNDABOUT_RIGHTSIDE_RIGHT | ||
22 | ROUNDABOUT_RIGHTSIDE_SLIGHT_LEFT | ||
23 | ROUNDABOUT_RIGHTSIDE_SLIGHT_RIGHT | ||
24 | ROUNDABOUT_RIGHTSIDE_SHARP_LEFT | ||
25 | ROUNDABOUT_RIGHTSIDE_SHARP_RIGHT | ||
26 | ROUNDABOUT_RIGHTSIDE_UTURN | ||
27 | RIGHTSIDE_UTURN | ||
28 | MERGE_LEFT | ||
29 | MERGE_RIGHT | ||
30 | LEFTSIDE_OFFRAMP | ||
31 | RIGHTSIDE_OFFRAMP | ||
33 | INTERMEDIATE_STOP_FLAG |
Hooks and Callbacks
Hooks and Callbacks related to Guidance can be found below.
GuidanceListener | |
---|---|
onArrivedAtStop | |
onTruckWarningUpdate | |
onOverSpeedLimitEvent | |
onCrossedCountryBorder | |
onSafetyCamUpdate | |
onShowLaneAssist | |
onHideLaneAssist | |
onETAChanged | |
onEstimatedTravelTimeUpdated | |
onDistanceToDestinationUpdated | |
onPositionUpdate | |
onTurnInstructionEvent | |
onTrafficInfoProcessedForCurrentRoute | |
onTrafficInforProcessedForAlternateRoute | |
onSpeedLimitChanged | |
onItineraryUpdated |