Description Usage Arguments Value Examples
Caluculate a routed distance between two points, with optional route description
1 2 |
fromaddress |
is an adress type: roadname+housenumber+postalcode |
fromcoord |
is a coordinate type: latitude, longtitude |
toaddress |
is an adress type: roadname+housenumber+postalcode |
tocoord |
is a coordinate type: latitude, longtitude |
mot |
is a mode of transport designator
|
routepolyline |
append a route in the form of a list of coordinates.
|
traveltime |
used in combination with mot = public.
|
Returns a list
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Route between a pair of coordinates:
route(fromcoord = "55.68958,12.55784", tocoord = "55.69043,12.53527")
# Route between a pair of addresses:
route(fromaddress = "elmegade 5 2200", toaddress = "R<c3><a5>dhuspladsen 2, 1550 K<c3><b8>benhavn V, 1550")
# Route from address to coordinate:
route(fromaddress = "elmegade 5 2200", tocoord = "55.69043,12.53527")
# Setting mode of transport to bicycle
route(fromcoord = "55.68958,12.55784", tocoord = "55.69043,12.53527", mot = "bicycle")
# Request polyline as list of coordinates and setting mode of transport to foot
route(fromcoord = "55.68958,12.55784", tocoord = "55.69043,12.53527", mot = "foot", routepolyline = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.