public static interface

DirectionsAssetHelper.TextComposer

com.steerpath.sdk.maps.defaults.DirectionsAssetHelper.TextComposer
Known Indirect Subclasses

Class Overview

Simple interface definition for composing directions instructions text.

Summary

Public Methods
abstract String compose(Context context, RouteTrackerProgress progress)
Compose user visible string for RouteTrackerProgress, for example "125m meters to destination (1min)"

Deprecated: use getTotalDistanceEstimation() and getTotalTravelTimeEstimation() instead.
abstract String compose(Context context, DirectionsResponse directions)
Deprecated: use getCurrentActionInstructions() and getNextActionInstructions() instead.
abstract String compose(Context context, RouteStep step)
Compose user visible string for RouteStep, for example "Walk 5m and turn left".
abstract String compose(Context context, DirectionsResponse directions, RouteStep currentStep, RouteTrackerProgress progress)
Compose user visible string, for example "125m meters to destination (1min)"

Deprecated: use getTotalDistanceEstimation() and getTotalTravelTimeEstimation() instead.
abstract String compose(Context context, RouteStep step, RouteTrackerProgress progress)
Compose user visible string for RouteStep with progress data, for example "Walk 5m and turn left".
abstract String compose(Context context, double totalDistance, double totalTime)
Compose user visible string for RouteTrackerProgress, for example "125m meters to destination (1min)"

Deprecated: use getTotalDistanceEstimation() and getTotalTravelTimeEstimation() instead.
abstract String getCurrentActionInstructions(Context context, DirectionsResponse directions, RouteStep currentStep, RouteTrackerProgress progress)
Instructions String that describes what user should do to reach next RouteStep.
abstract String getDestinationReachedMessage(Context context)
Get "destination reached" -message
abstract String getDistanceToNextStep(Context context, DirectionsResponse directions, RouteStep currentStep, RouteTrackerProgress progress)
Distance String what it takes to reach next RouteStep.
abstract String getNextActionInstructions(Context context, DirectionsResponse directions, RouteStep currentStep, RouteTrackerProgress progress)
Instructions String what user should do after he or she reaches next RouteStep.
abstract String getTotalDistanceEstimation(Context context, DirectionsResponse directions, RouteStep currentStep, RouteTrackerProgress progress)
Distance estimation String what it takes to reach destination.
abstract String getTotalTravelTimeEstimation(Context context, DirectionsResponse directions, RouteStep currentStep, RouteTrackerProgress progress)
Travel time estimation String how long it takes to reach destination of the route.

Public Methods

public abstract String compose (Context context, RouteTrackerProgress progress)

Compose user visible string for RouteTrackerProgress, for example "125m meters to destination (1min)"

Deprecated: use getTotalDistanceEstimation() and getTotalTravelTimeEstimation() instead.

public abstract String compose (Context context, DirectionsResponse directions)

Deprecated: use getCurrentActionInstructions() and getNextActionInstructions() instead.

public abstract String compose (Context context, RouteStep step)

Compose user visible string for RouteStep, for example "Walk 5m and turn left".

Deprecated: use getCurrentActionInstructions() and getNextActionInstructions() instead.

public abstract String compose (Context context, DirectionsResponse directions, RouteStep currentStep, RouteTrackerProgress progress)

Compose user visible string, for example "125m meters to destination (1min)"

Deprecated: use getTotalDistanceEstimation() and getTotalTravelTimeEstimation() instead.

Parameters
directions full route
currentStep current RouteStep with route
progress progress within current route step

public abstract String compose (Context context, RouteStep step, RouteTrackerProgress progress)

Compose user visible string for RouteStep with progress data, for example "Walk 5m and turn left".

Deprecated: use getCurrentActionInstructions() and getNextActionInstructions() instead.

public abstract String compose (Context context, double totalDistance, double totalTime)

Compose user visible string for RouteTrackerProgress, for example "125m meters to destination (1min)"

Deprecated: use getTotalDistanceEstimation() and getTotalTravelTimeEstimation() instead.

public abstract String getCurrentActionInstructions (Context context, DirectionsResponse directions, RouteStep currentStep, RouteTrackerProgress progress)

Instructions String that describes what user should do to reach next RouteStep. For example: "Walk 6 m"

Parameters
progress currently does nothing.

public abstract String getDestinationReachedMessage (Context context)

Get "destination reached" -message

public abstract String getDistanceToNextStep (Context context, DirectionsResponse directions, RouteStep currentStep, RouteTrackerProgress progress)

Distance String what it takes to reach next RouteStep. For example: "6 m"

Parameters
progress if null, distance is calculated from the currentStep

public abstract String getNextActionInstructions (Context context, DirectionsResponse directions, RouteStep currentStep, RouteTrackerProgress progress)

Instructions String what user should do after he or she reaches next RouteStep. For example: "and turn right".
This string completes the sentence that starts with "current action instructions". For example: "Walk 6 m" + " and turn right"

Parameters
progress currently does nothing.

public abstract String getTotalDistanceEstimation (Context context, DirectionsResponse directions, RouteStep currentStep, RouteTrackerProgress progress)

Distance estimation String what it takes to reach destination. For example: "5 m"

Parameters
progress if null, estimation is calculated from the currentStep

public abstract String getTotalTravelTimeEstimation (Context context, DirectionsResponse directions, RouteStep currentStep, RouteTrackerProgress progress)

Travel time estimation String how long it takes to reach destination of the route. For example: "15 s" or "3 min".

Parameters
progress if null, estimation is calculated from the currentStep