Class GSRouteLeg

Represents a leg of journey. Provides a set of directions instructions and summary information for the leg.

Class Summary
Constructor Attributes Constructor Name and Description
 
GSRouteLeg(route, instructionDefinitions, distance, time, startLabel, stopLabel, index)

Creates a new GSRouteLeg object.

Method Summary
Method Attributes Method Name and Description
 
Get the distance travelled for this route leg
 
Get the driving instructions for this route leg
 
Get the time for this route leg
Class Detail
GSRouteLeg(route, instructionDefinitions, distance, time, startLabel, stopLabel, index)

Creates a new GSRouteLeg object.

You should not need to instantiate GSRouteLeg objects yourself - GSRoute will instantiate GSRouteLeg objects for you automatically. See GSRoute#getLegs

Parameters:
{GSRoute} route
the route that this route leg belongs to
{Array} instructionDefinitions
an array of instruction definitions
{int} distance
the distance in metres
{int} time
the duration in minutes
{String} startLabel
the label to use for the "start" instruction for this leg
{String} stopLabel
the label to use for the "stop" instruction for this leg
{int} index
the index of this leg within the route
Method Detail
{int} getDistance()
Get the distance travelled for this route leg
Returns:
{int} the distance travelled for this route leg in metres

{GSRouteInstruction[]} getInstructions()
Get the driving instructions for this route leg
Returns:
{GSRouteInstruction[]} an array of GSRouteInstruction objects

{float} getTime()
Get the time for this route leg
Returns:
{float} the time for this route leg in minutes

Documentation generated by JsDoc Toolkit 2.3.2 on Wed Mar 07 2012 11:47:29 GMT+1300 (NZDT)