Itinerary
Class: Itinerary
Main attributes are: nodes: the ordered list of Node edges: the ordered list of Edge start: the start point (Coordinates) end: the end point (Coordinates) length: the route length
Constructors
Constructor
new Itinerary(
__namedParameters):Itinerary
Parameters
__namedParameters
ItineraryConstructor
Returns
Itinerary
Properties
destination
destination:
Coordinates
duration
duration:
number
endTime
endTime:
number|null
legs
readonlylegs:Leg[]
origin
origin:
Coordinates
startTime
startTime:
number|null
Accessors
coords
Get Signature
get coords():
Coordinates[]
Returns
Set Signature
set coords(
_):void
Parameters
_
Returns
void
distance
Get Signature
get distance():
number
Returns
number
Set Signature
set distance(
_):void
Parameters
_
number
Returns
void
price
Get Signature
get price():
number
Returns
number
Set Signature
set price(
_):void
Parameters
_
number
Returns
void
steps
Get Signature
get steps():
Step[]
Returns
Step[]
Set Signature
set steps(
_):void
Parameters
_
Step[]
Returns
void
transitMode
Get Signature
get transitMode():
TransitMode
Returns
TransitMode
Set Signature
set transitMode(
_):void
Parameters
_
TransitMode
Returns
void
Methods
equals()
equals(
obj):boolean
Parameters
obj
Itinerary
Returns
boolean
forceUnknownLevelTo0()
forceUnknownLevelTo0():
void
Returns
void
multiplyLevel()
multiplyLevel(
levelFactor):void
Parameters
levelFactor
number
Returns
void
toGeoJson()
toGeoJson():
FeatureCollection
Returns
FeatureCollection
toGraph()
toGraph():
Graph
Returns
Graph
toJson()
toJson():
ItineraryJson
Returns
ItineraryJson
updateStepsFromLegs()
updateStepsFromLegs():
void
TODO: Remove it in router v3 Update steps info thanks to the coordinates of the whole itinerary. This method will update:
- all steps number
- first/last steps
- previousBearing/nextBearing/angle of first and last step of each leg
- distance/duration of first and last step of each leg
- remove type depart | arrive if step is not first or last
Returns
void
equals()
staticequals(obj1,obj2):boolean
Parameters
obj1
Itinerary
obj2
Itinerary
Returns
boolean
fromGraphRoute()
staticfromGraphRoute(graphRoute,transitMode?):Itinerary
Parameters
graphRoute
GraphRoute
transitMode?
TransitMode
Returns
Itinerary
fromItineraries()
staticfromItineraries(...itineraries):Itinerary
Parameters
itineraries
...Itinerary[]
Returns
Itinerary
fromJson()
staticfromJson(json):Itinerary
Parameters
json
ItineraryJson
Returns
Itinerary
fromOrderedCoordinates()
staticfromOrderedCoordinates(coords,origin,destination,transitMode?):Itinerary
Convert ordered Coordinates to Itinerary
Parameters
coords
origin
destination
transitMode?
TransitMode
Returns
Itinerary
fromOrderedPointsArray()
staticfromOrderedPointsArray(points,start,end):Itinerary
Convert lat/lng/level? points to Itinerary
Parameters
points
(Vector3_t | Point2_t)[]
start
Vector3_t | Point2_t
end
Vector3_t | Point2_t
Returns
Itinerary