Get spans for a simple route

This request specifies an origin and a destination to calculate a route with the respective spans.

curl -X GET \
   'https://router.hereapi.com/v8/routes?destination=52.530394,13.400683&origin=52.530728,13.383833&return=polyline&transportMode=car&spans=names&apikey={YOUR_API_KEY}'
Example route
Figure 1. Example route

This tutorial demonstrates how to obtain the result of the requested spans for these attributes:

Offset Names Speed Limit (m/s)
0 Invalidenstraße 13.8888893 (50 km/h)
11 Invalidenstraße 8.333334 (30 km/h)
43 Brunnenstraße 8.333334 (30 km/h)

As the request above also specifies spans=names, the response contains street names in the spans blocks. For each unique street name, the request contains a separate span.

...
"spans": [
  {
    "offset": 0,
    "names": [
      {
        "language": "de",
        "value": "Invalidenstraße"
      }
    ]
  },
  {
    "offset": 43,
    "names": [
      {
        "language": "de",
        "value": "Brunnenstraße"
      }
    ]
  }
],
...

results matching ""

    No results matching ""