The alk.layer.RoutingLayer
layer is used to display routes.
Once you have added a routing layer to your map, you can add a route to the layer. Descriptions for the parameters can be found in the table below.
The routeServiceOptions
parameter contains options related to the generation of the route and optional reports.
Parameter | Type/Values | Description |
---|---|---|
vehicleType |
[0 | 1 | 2] |
Default: 0 Restricts the route to roads that are accessible by the selected vehicle type.
|
routingType |
[0 | 1 | 2] |
Default: 0 Generated the route to match the type.
|
routeOptimization |
[0 | 1 | 2] |
Default: 0
|
tollDiscourage |
boolean |
Default: false Generates the route by trying to avoid toll roads. |
classOverrides |
[0 | 1 | 2 | 3] |
Default: 0
|
bordersOpen |
boolean |
Default: true Indicates whether borders are open for travel. |
overrideRestrict |
boolean |
Default: false
Indicates whether or not to override truck restrictions |
highwayOnly |
boolean |
Default: false Restricts the route to only highway roads. |
hazMatType |
[0 | 1 | 2 | 3 | 4 | 5 | 6] |
Default: 0
Restricts the route to roads that allow transportation of the selected hazardous material.
|
distanceUnits |
[0 | 1] |
Default: 0
Distance units as miles or kilometers.
|
trkUnits |
[0 | 1] |
Default: 0
Vehicle dimension units; can be English or Metric.
|
trkHeight |
number |
The height of the vehicle in feet and inches or meters depending on units. Example 13'6" or 4.1148. |
trkLength |
number |
The length of the vehicle in feet and inches or meters depending on units. Example 13'6" or 4.1148. |
trkWidth |
number |
The width of the vehicle in feet and inches or meters depending on units. Example 13'6" or 4.1148. |
trkWeight |
number |
The weight of the vehicle in pounds or kilograms depending on units. |
trkAxles |
number |
Default: 5 The number of axles on the vehicle; acceptable values are 2 through 14. |
inclFerryDist |
boolean |
Default: true
Indicates whether or not to include ferry distances in mileage calculations. |
fuelUnits |
[0 | 1] |
Default: 0
Fuel units as gallons and liters.
|
truckConfig |
[0 | 1 | 2 | 3 | 4] |
Default: 0
The vehicle style.
|
inclTollData |
boolean |
Default: true
Indicates whether or not reports should calculate toll costs. |
fuelEconLoad |
number |
The fuel efficiency (distance units per fuel units) when loaded. |
fuelEconEmpty |
number |
The fuel efficiency (distance units per fuel units) when empty.
|
costPerFuelUnit |
number |
The cost per fuel unit of fuel.
|
costGHG |
number |
The cost of greenhouse gas in lbs. per fuel unit. |
costMaintLoad |
number |
The maintenance cost per distance unit when loaded.
|
costMaintEmpty |
number |
The maintenance cost per distance unit when empty. |
costTimeLoad |
number |
The time cost per mile/km when loaded. |
costTimeEmpty |
number |
The time cost per mile/km when empty. |
tollCurrency |
[0 | 1] |
Default: 0
The toll currency.
|
exchangeRate |
number |
The change rate to convert US dollars to Canadian dollars. |
citeInt |
number |
The cite interval to be used when generating a geotunnel report. The minimum value is 0.1. |
region |
[NA | EU | OC | SA | AS | AF | ME] |
Default: NA The data region in which the route stops are located. Note: If region is not provided, region value will be inherited from baseLayer region parameter. |
dataset |
[Current | PCM_EU | PCM_OC | PCM_SA |
Default: Current For users licensed for multiple regional datasets. |