public interface

RouteStep

implements Parcelable
com.steerpath.sdk.directions.RouteStep

Class Overview

A route is made up out of steps describing what actions a user needs to take to follow the route.

Summary

Nested Classes
@interface RouteStep.Action  
Constants
String ACTION_CONTINUE "Continue with previous action"
String ACTION_DESTINATION User has reached destination.
String ACTION_ENTER Think "enter" as "enter an area".
String ACTION_GO At first glance, "go" is conceptually pretty close to "enter".
String ACTION_GO_DOWN Walk stairs down.
String ACTION_GO_UP Walk stairs up.
String ACTION_NONE No action needed.
String ACTION_REROUTE Reroute helper.
String ACTION_TURN_LEFT Circa 45 degree turn left.
String ACTION_TURN_RIGHT Circa 45 degree turn right.
String ACTION_TURN_SHARP_LEFT Circa 60 degree turn left.
String ACTION_TURN_SHARP_RIGHT Circa 60 degree turn right.
String ACTION_TURN_SLIGHT_LEFT Circa 30 degree turn left.
String ACTION_TURN_SLIGHT_RIGHT Circa 30 degree turn right.
String ACTION_WAYPOINT User has reached waypoint.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Methods
abstract String getAction()
Retrieve Action
abstract String getBuildingRef()
Retrieve building reference for this RouteStep.
abstract List<LatLng> getCoordinates()
Retrieve coordinates.
abstract String getDestinationName()
Retrieve the name of destination, i.e "MacDonald's" or "Floor 3"
abstract String getDirection()
Retrieves information if travel direction is ascending or descending, i.e "up" or "down".
abstract double getDistance()
Retrieve the distance travelled within this step.
abstract double getDuration()
Retrieve the duration of this step, in seconds.
abstract int getFloor()
Retrive floor index.
abstract JSONObject getPolyline()
Retrieve a GeoJSON polyline geometry describing this step.
abstract String getTravelType()
Retrieve travel type.
[Expand]
Inherited Methods
From interface android.os.Parcelable

Constants

public static final String ACTION_CONTINUE

"Continue with previous action"

Constant Value: "continue"

public static final String ACTION_DESTINATION

User has reached destination. User of the SDK may propose user to do something special when this event is triggered.

Constant Value: "destination"

public static final String ACTION_ENTER

Think "enter" as "enter an area". For example "enter Floor 3 (from elevator)".

Constant Value: "enter"

public static final String ACTION_GO

At first glance, "go" is conceptually pretty close to "enter". "Go" refers to taking some (non-walk) vehicle, for example elevator, escalator, skytrain or whatever.

Constant Value: "go"

public static final String ACTION_GO_DOWN

Walk stairs down.

Constant Value: "go_downwards"

public static final String ACTION_GO_UP

Walk stairs up.

Constant Value: "go_upwards"

public static final String ACTION_NONE

No action needed. In practice, this can be "waiting for something".

Constant Value: "none"

public static final String ACTION_REROUTE

Reroute helper.

Constant Value: "reroute"

public static final String ACTION_TURN_LEFT

Circa 45 degree turn left.

Constant Value: "turn_left"

public static final String ACTION_TURN_RIGHT

Circa 45 degree turn right.

Constant Value: "turn_right"

public static final String ACTION_TURN_SHARP_LEFT

Circa 60 degree turn left.

Constant Value: "turn_sharp_left"

public static final String ACTION_TURN_SHARP_RIGHT

Circa 60 degree turn right.

Constant Value: "turn_sharp_right"

public static final String ACTION_TURN_SLIGHT_LEFT

Circa 30 degree turn left.

Constant Value: "turn_slight_left"

public static final String ACTION_TURN_SLIGHT_RIGHT

Circa 30 degree turn right.

Constant Value: "turn_slight_right"

public static final String ACTION_WAYPOINT

User has reached waypoint. User of the SDK may propose user to do something special when this event is triggered.

Constant Value: "waypoint"

Public Methods

public abstract String getAction ()

Retrieve Action

public abstract String getBuildingRef ()

Retrieve building reference for this RouteStep.

public abstract List<LatLng> getCoordinates ()

Retrieve coordinates. Provided for convenience.

public abstract String getDestinationName ()

Retrieve the name of destination, i.e "MacDonald's" or "Floor 3"

public abstract String getDirection ()

Retrieves information if travel direction is ascending or descending, i.e "up" or "down".

public abstract double getDistance ()

Retrieve the distance travelled within this step.

Returns
  • the distance this step covers, in meters.

public abstract double getDuration ()

Retrieve the duration of this step, in seconds.

Returns
  • the number of seconds this step is estimated to take.

public abstract int getFloor ()

Retrive floor index. Provided for convenience.

public abstract JSONObject getPolyline ()

Retrieve a GeoJSON polyline geometry describing this step. The coordinate's are triplets where the third element represents the level.

Returns
  • a GeoJSON polyline describing this step.

public abstract String getTravelType ()

Retrieve travel type. Travel type comes from the Steerpath server and may vary between different projects. For example, if your project has two buildings and transportation between buildings happens with, say, by levitation. Levitation is very specific to your project - no one else has that. We may still add that to your server configuration as one travel type and app has a chance to deal with it.

Common travel types:
elevator
stairs
escalator
walk