Skip to content

add_route Tag ​

With this tag you can add a route directly to a map. You can use it just like the {maps:add_marker} tag, just put it inside the {exp:reinos_maps:map}...{/exp:reinos_maps:map} tag.

The route is fetched from the route provider that is set in the Maps module (see CP overview) and drawn on the map as a polyline. When no route is found, nothing is drawn. See How it works for the full flow.

The tag ​

{maps:add_route}

Tag parameters ​

Below are the Tag Parameters. Those parameters can be used in the tag described above.

address:from ​

A from address name, can also a name like 'reichenbach im vogtland or amsterdam or america'.

address:from="" [REQUIRED] if latlng:from is empty

latlng:from ​

latitude longitude coordinates

latlng:from="" [REQUIRED] if address:from is empty

address:to ​

A to address name, can also a name like 'reichenbach im vogtland or amsterdam or america'.

address:to="" [REQUIRED] if latlng:to is empty

latlng:to ​

latitude longitude coordinates

latlng:to="" [REQUIRED] if address:to is empty

address:waypoints ​

Stops between the from and to point. Addresses separated with a pipeline '|'

address:waypoints="" [OPTIONAL] if latlng:waypoints is empty

latlng:waypoints ​

Stops between the from and to point. Latitude longitude coordinates separated with a pipeline '|'

latlng:waypoints="" [OPTIONAL] if address:waypoints is empty

travel_mode ​

set the travel mode.
values: driving walking cycling (Google Maps, OpenRouteService and OSRM, from v5.0.0) transit (Google Maps and Bing Maps) wheelchair (OpenRouteService, from v5.0.0)

travel_mode="driving" [OPTIONAL]

optimize_waypoints ​

Let the route provider reorder the waypoints to get a better and optimized route. Set it to no to keep the waypoints in the order you requested them.

Note: Bing Maps doesn't optimize the waypoints of a transit route.

optimize_waypoints="yes" [OPTIONAL]

avoid ​

values: tolls highways ferry
You can use multiple options separated with a pipeline (|)

avoid="tolls" [OPTIONAL]

lang ​

Set the language based on the language code

Note: Bing Maps expects a culture code, for example nl-NL.

lang="en" [OPTIONAL]

unit ​

Set the unit of the distances.
values: km mi

unit="km" [OPTIONAL]

stroke:color ​

set the stroke color.

stroke:color="#131540" [OPTIONAL]

stroke:opacity ​

set the stroke opacity.

stroke:opacity="0.6" [OPTIONAL]

stroke:weight ​

set the stroke weight.

stroke:weight="6" [OPTIONAL]

Fit tag ​

To fit the routes on the map, add the following parameter to the {exp:reinos_maps:map} tag

fit_map:routes ​

Fit the map based on the routes. Routes are polylines, so this fits the map on all polylines of the map.

{exp:reinos_maps:map
    fit_map:routes="no" [OPTIONAL]	
}