Routing Layer

The alk.layer.RoutingLayer layer is used to display routes.

Add A Route

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.

Options

The routeServiceOptions parameter contains options related to the generation of the route and optional reports.

ParameterType/ValuesDescription
vehicleType[0 | 1 | 2]Default: 0
Restricts the route to roads that are accessible by the selected vehicle type.
  • 0 - Truck
  • 1 - Light Truck
  • 2 - Automobile
routingType[0 | 1 | 2]Default: 0
Generated the route to match the type.
  • 0 - Practical
  • 1 - Shortest
  • 2 - Fastest
routeOptimization[0 | 1 | 2]Default: 0
  • 0 - None
  • 1 - Optimize All Stops
  • 2 - Optimize Intermediate Stops
tollDiscouragebooleanDefault: false
Generates the route by trying to avoid toll roads.
classOverrides[0 | 1 | 2 | 3]Default: 0
  • 0 - Indicates that no class overrides are present.
  • 1 - Indicates a 53' class override.
  • 2 - Indicates a National Network class override.
  • 3 - Indicates a 53' and National Network class override.
bordersOpenbooleanDefault: true
Indicates whether borders are open for travel.
overrideRestrictbooleanDefault: false
Indicates whether or not to override truck restrictions
highwayOnlybooleanDefault: 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.
  • 0 - None
  • 1 - General
  • 2 - Caustic
  • 3 - Explosives
  • 4 - Flammable
  • 5 - Inhalants
  • 6 - Radioactive
distanceUnits[0 | 1]Default: 0
Distance units as miles or kilometers.
  • 0 - Miles
  • 1 - Kilometers
trkUnits[0 | 1]Default: 0
Vehicle dimension units; can be English or Metric.
  • 0 - Indicates that vehicle dimension units should be English, e.g., 13'6".
  • 1 - Indicates that vehicle dimension units should be metric.
trkHeightnumberThe height of the vehicle in feet and inches or meters depending on units. Example 13'6" or 4.1148.
trkLengthnumberThe length of the vehicle in feet and inches or meters depending on units. Example 13'6" or 4.1148.
trkWidthnumberThe width of the vehicle in feet and inches or meters depending on units. Example 13'6" or 4.1148.
trkWeightnumberThe weight of the vehicle in pounds or kilograms depending on units.
trkAxlesnumberDefault: 5
The number of axles on the vehicle; acceptable values are 2 through 14.
inclFerryDistbooleanDefault: true
Indicates whether or not to include ferry distances in mileage calculations.
fuelUnits[0 | 1]Default: 0
Fuel units as gallons and liters.
  • 0 - Gallons
  • 1 - Liters
truckConfig[0 | 1 | 2 | 3 | 4]Default: 0
The vehicle style.
  • 0 - Indicates that no particular vehicle style is chosen.
  • 1 - 28' double trailer.
  • 2 - 40' straight trailer.
  • 3 - 48' semitrailer.
  • 4 - 53' semitrailer
inclTollDatabooleanDefault: true
Indicates whether or not reports should calculate toll costs.
fuelEconLoadnumberThe fuel efficiency (distance units per fuel units) when loaded.
fuelEconEmptynumberThe fuel efficiency (distance units per fuel units) when empty.
costPerFuelUnitnumberThe cost per fuel unit of fuel.
costGHGnumberThe cost of greenhouse gas in lbs. per fuel unit.
costMaintLoadnumberThe maintenance cost per distance unit when loaded.
costMaintEmptynumberThe maintenance cost per distance unit when empty.
costTimeLoadnumberThe time cost per mile/km when loaded.
costTimeEmptynumberThe time cost per mile/km when empty.
tollCurrency[0 | 1]Default: 0
The toll currency.
  • 0 - Indicates that the currency should be United States dollars.
  • 1 - Indicates that the currency should be Canadian dollars.
exchangeRatenumberThe change rate to convert US dollars to Canadian dollars.
citeIntnumberThe 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
| PCM_AF | PCM_ME | PCM_IN | PCM_SE]
Default: Current
For users licensed for multiple regional datasets.
Last updated November 5, 2019.