new IWRouteOptions()
Creates a new options object.
Members
-
TYPE_ECONOMY :String
-
Most economic route.
Type:
- String
-
TYPE_LENGTH :String
-
Shortest route.
Type:
- String
-
TYPE_SPEED :String
-
Fastest route.
Type:
- String
Methods
-
getAlternatives()
-
Returns the number of alternative routes to calculate.
Returns:
the number of routes- Type
- number
-
getAvoidFerries()
-
Returns true if routes with ferries are avoided or not.
Returns:
true if ferries are avoided, false otherwise- Type
- boolean
-
getAvoidHighways()
-
Returns true if routes with highways are avoided or not.
Returns:
true if highways are avoided, false otherwise- Type
- boolean
-
getAvoidToll()
-
Returns true if routes with toll are avoided or not.
Returns:
true if toll is avoided, false otherwise- Type
- boolean
-
getCitySpeed()
-
Returns the average driving speed in cities.
Returns:
the average driving speed in cities.- Type
- number
-
getCountryRoadSpeed()
-
Returns the average driving speed on country roads. The default value is set to 70
Returns:
the average driving speed on country roads- Type
- number
-
getEmergencyRoutingRadius()
-
Returns the radius for emergency routing. The default value is set to 0.
Returns:
the radius in meters- Type
- number
-
getHighwaySpeed()
-
Returns the average driving speed on highways. The default value is set to 120.
Returns:
the average driving speed on highways- Type
- number
-
getMobilityProfile()
-
Gets the mobility profile (like pedestrian or car)
Returns:
- Type
- string
-
getProfile()
-
Gets the routing profile
- Deprecated:
-
- use getMobilityProfile instead
Returns:
- Type
- string
-
getStartTime()
-
Returns the start time (relevant for the traffic situation) Possible values are null (time independent), 'NOW' or an ISO 8901 time and date string like '2017-09-28T11:50'.
Returns:
the start time- Type
- string
-
getTrafficProfiles()
-
Gets the traffic profiles (like traffic flows or traffic events)
Returns:
- Type
- Array.<string>
-
getType()
-
Returns the current routing type.
Returns:
the current routing type- Type
- String
-
getUserDefinedProfiles()
-
Gets the user defined profiles
Returns:
- Type
- Array.<String>
-
setAlternatives(alternatives)
-
Sets the number of alternative routes to calculate.
Parameters:
Name Type Description alternatives
number the number of routes Returns:
- Type
- void
-
setAvoidFerries(avoidFerries)
-
Avoid routes with ferries or not.
Parameters:
Name Type Description avoidFerries
boolean avoid ferries (true) or not (false) Returns:
- Type
- void
-
setAvoidHighways(avoidHighways)
-
Avoid routes with highways or not.
Parameters:
Name Type Description avoidHighways
boolean avoid highways (true) or not (false) Returns:
- Type
- void
-
setAvoidToll(avoidToll)
-
Avoid routes with toll (for cars, won't affect trucks) or not.
Parameters:
Name Type Description avoidToll
boolean avoid toll (true) or not (false) Returns:
- Type
- void
-
setCitySpeed(citySpeed)
-
Sets the average driving speed in cities. The default value is set to 50.
Parameters:
Name Type Description citySpeed
number the average driving speed in cities Throws:
Throws an exception if the speed value is not greater than zero.Returns:
- Type
- void
-
setCountryRoadSpeed(countryRoadSpeed)
-
Sets the average driving speed on country roads. The default value is set to 70.
Parameters:
Name Type Description countryRoadSpeed
number the average driving speed on country roads Throws:
Throws an exception if the speed value is not greater than zero.Returns:
- Type
- void
-
setEmergencyRoutingRadius(radius)
-
Sets the radius for the emergency vehicles routing. The default value is set to 0.
Parameters:
Name Type Description radius
number the radius in meters Throws:
Throws an exception if the value is not greater than zero.Returns:
- Type
- void
-
setHighwaySpeed(highwaySpeed)
-
Sets the average driving speed on highways. The default value is set to 120.
Parameters:
Name Type Description highwaySpeed
number the average driving speed on highways Throws:
Throws an exception if the speed value is not greater than zero.Returns:
- Type
- void
-
setMobilityProfile(mobilityProfile)
-
Sets the mobility profile (like pedestrian or car)
Parameters:
Name Type Description mobilityProfile
string the profile name Returns:
- Type
- void
-
setProfile(profile)
-
Sets the routing profile
Parameters:
Name Type Description profile
string the profile to use - Deprecated:
-
- use setMobilityProfile instead
-
setStartTime(startTime)
-
Sets the start time (relevant for the traffic situation) Possible values are null (time independent), 'NOW' or an ISO 8601 time and date string like '2017-09-28T11:50'.
Parameters:
Name Type Description startTime
string the start time as defined above Returns:
- Type
- void
-
setTrafficProfiles(trafficProfiles)
-
Sets the traffic profiles (like traffic flows or traffic events)
Parameters:
Name Type Description trafficProfiles
Array.<string> an array of profile names -
setType(type)
-
Sets the routing mode to calculate the route. The following modes are supported:
- IWRouteOptions.TYPE_SPEED - fastest route
- IWRouteOptions.TYPE_LENGTH - shortest route
- IWRouteOptions.TYPE_ECONOMY - most economic route
The default value is set to IWRouteOptions.TYPE_SPEED.
Parameters:
Name Type Description type
String the new routing mode Returns:
- Type
- void
-
setUserDefinedProfiles(userDefinedProfiles)
-
Sets the user defined profiles
Parameters:
Name Type Description userDefinedProfiles
Array.<String> an array of profile names Returns:
- Type
- void
-
toString()
-
Returns a string representation for this object.
Returns:
- Type
- String