new IWRouteEntry(direction, totalDistance, totalTime)
Creates a new route entry
Parameters:
Name | Type | Description |
---|---|---|
direction |
object | a direction from a JSON routing response |
totalDistance |
number | sum of the distance in meter so far |
totalTime |
number | sum of the time in seconds so far |
Methods
-
getConnector()
-
Returns the connector.
Returns:
- Type
- String
-
getCoordinate()
-
Returns the starting coordinate for this route segment.
Returns:
the coordinate- Type
- IWCoordinate
-
getDescription()
-
Returns the description.
Returns:
the description- Type
- String
-
getDirection()
-
Returns one of the following direction code for this route segment.
- 0: straight ahead
- 1: half right
- 2: right
- 3: sharp right
- -1: half left
- -2: left
- -3: sharp left
- 11: roundabout
Returns:
the direction code- Type
- number
-
getEntryDistance()
-
Returns the distance.
Returns:
- Type
- number
-
getEntryTime()
-
Returns the entry time.
Returns:
- Type
- number
-
getFormattedEntryDistance()
-
Returns the absolute distance formatted as a string.
Returns:
- Type
- string
-
getFormattedEntryTime()
-
Returns the entry time formatted as a string.
Returns:
- Type
- string
-
getImageClass()
-
Returns the CSS class for the image of this entry.
Returns:
the description- Type
- String
-
getOrientation()
-
Returns the orientation.
Returns:
the orientation- Type
- number
-
getRoundaboutNumber()
-
Returns the roundabout number.
Returns:
- Type
- String
-
getRoundaboutType()
-
Returns the roundabout type.
Returns:
- Type
- String
-
getSegment()
-
Returns the segment.
Returns:
- Type
- String
-
getSignPost()
-
Returns the signpost.
Returns:
the signpost- Type
- String
-
getStreetType()
-
Returns the street type of the route entry.
Returns:
type of the street- Type
- String
-
getTotalDistance()
-
Returns the total distance.
Returns:
- Type
- number
-
getTotalTime()
-
Returns the total time.
Returns:
- Type
- number
-
getType()
-
Returns the type of the route entry.
Returns:
type of the entry- Type
- String
-
toString()
-
Returns a string representation of this object.
Returns:
- Type
- String