Attribute Switches
Attribute switches allow you to select the subset of response data you require for each request. By default, the API returns a list of [waypoints
, summary
, and legs
]. If you use the routeattributes
request parameter, you can add or remove elements for particular use cases from this default list.
To save bandwidth and simplify processing, the best practice is to select only the set of attributes you require, by using the none
value and adding required attributes.
-
routeattributes
, which can be used to enable the output of:-
lines
or the short versionli
for public transport line information -
groups
, or the short versiongr
for maneuver group information
-
-
maneuverattributes
, which controls additional Public Transport Maneuver information -
linkattributes
, which controls additional Public Transport link information -
lineattributes
, which controls additional Public Transport line information output
-
routeattributes
, which can be used to enable the output of:-
RouteId
, or the short versionri
;RouteId
for calculated route reference is not supported for Public Transport.
-
Examples:
legs
only: &routeattributes=none,legs
shape
and notes
to the response, in addition to the default list: &routeattributes=shape,notes
&routeattributes=sh,no
legs
from the default list: &routeattributes=-legs
notes
to the previous example, thus returning waypoints
, summary
and notes
, you can use: &routeattributes=-legs,notes
legs
are required, use the all
value and then remove the unnecessary attributes. The following code snippet returns the whole attribute set except legs
: &routeattributes=all,-legs
For a complete list of attribute switches available in the API, see RouteRepresentationOptionsType.