Module: cercaliagl/service/Routing


Classes

Routing

Type Definitions

RoutingOptions{Object}

Properties:
Name Type Argument Description
destination module:cercaliagl/LonLat~LonLat | module:cercaliagl/service/Routing~RoutingStep <optional>

Destination coordinates.

edges boolean <optional>

Get edges IDs

infoedges boolean <optional>

Adds specific information for each section to the route report.
An infoedges tag is added to each substage with specific information of each section.
The following attributes are reported for each section:
height: height from sea level in meters.
gradient: slope of the section
geometry: Stretch geometry
meters: Length of the section
maxkph: Legal maximum speed.

lang string <optional>

Report language (only if report parameter is true).

mindist boolean <optional>

Minimum substage distance, in meters. The larger this distance , the smaller the number of substages. Default value 1000.

origin module:cercaliagl/LonLat~LonLat | module:cercaliagl/service/Routing~RoutingStep <optional>

Origin coordinates.

reorder boolean <optional>

Specify if you want to reorder or not the route stops, to get the faster/shorter route. Maximum 10 stop points.

report boolean <optional>

Get the textual route report (if not, gets a faster response). Default 0.

steps Array.<module:cercaliagl/LonLat~LonLat> | Array.<module:cercaliagl/service/Routing~RoutingStep> <optional>

Array with stop points coordinates.

tolerance number <optional>

Route geometry generalization, in meters (if =0, returns the original geometry). Default value 5 (meters).

toll boolean <optional>

Specify if you need to get the toll roads cost for the route. Currently only avaliable for Spain, Portugal and Andorra. Default false.

weight string <optional>

Route type: time (faster), distance (shorter), money (toll free route). Default value: time.

vweight number <optional>

Route logistics parameter. Total maximum vehicle weight.

vaxleweight number <optional>

Route logistics parameter. Maximum vehicle axle weight.

vheight number <optional>

Route logistics parameter. Maximum vehicle height.

vlength number <optional>

Route logistics parameter. Maximum vehicle length.

vwidth number <optional>

Route logistics parameter. Maximum vehicle width.

vmaxvel number <optional>

Route logistics parameter. Maximum vehicle speed.

rimp boolean <optional>

Route logistics parameter. Dangerous goods

trinfodate string <optional>

Route logistics parameter. Number days to consecutives to show restrictions. Info date format YYYYMMDD.

trinfodays number <optional>

Route logistics parameter. Avoid route restrictions. In timestamp format.

trstart number <optional>

Route logistics parameter. Avoid route restrictions. In timestamp format.

originIsDepot boolean <optional>

This parameter only works if REORDER parameter is used. Values:
true (default): origin cannot be reordered (default).
false: origin is one more stop and can be reordered. Useful when you cannot choose the starting point of the vehicle.

destinationIsDepot boolean <optional>

This parameter only works if REORDER parameter is used. Values:
true (default): Destination cannot be reordered (default).
false: Destination is one more stop and can be reordered. Useful when after attending some services you don’t have to return to a base.

concurrency boolean | undefined <optional>

Default true. Multiple requests at same time. If false it cancel previous pending requests.

departuretime string <optional>

Departure time in format ISO8601.

RoutingStep{Object}

Properties:
Name Type Argument Description
streetId string <optional>

Street ID.
For example: Avinguda Diagonal (Barcelona) => ESP080193000092155

streetNum number <optional>

House number

cityId string <optional>

City ID.
For example: Alcalá de Henares (Madrid) => ESP17240205552994

municipalityId string <optional>

Municipality ID. P.e: Madrid => ESP280796