GuidesAPI Reference
Guides

Obtain route polylines for the tour

In the HERE Tour Planning solution, you can obtain route polylines, which are particularly beneficial for displaying routes on a map. Polylines are efficient for path rendering and can be easily plotted by using map libraries such as the HERE Maps API for JavaScript.

To retrieve route details using the HERE Tour Planning API, you need access to the HERE Routing API v8. This API provides routing data and is a prerequisite for accessing route information. Utilizing the polylines feature incurs additional costs related to the HERE Routing API v8 consumption.

For more information about the HERE Routing API v8, see Get started in the corresponding developer guide.

📘

Note

As an alternative approach, you can develop a custom logic to request a route plan from the HERE Route API v8 after receiving the sequence of stops from the HERE Tour Planning API. However, the polylines feature ensures that the HERE Tour Planning API handles routing requests, eliminating the need for custom code that would otherwise be required to integrate the two services.

Request route polylines

To obtain route polylines in the HERE Tour Planning API solution, include the "routeDetails": ["polyline"] array within the "configuration" object of the problem JSON, as shown in the following simplified example:

{
  "configuration": {
    "routeDetails": [
      "polyline"
    ]
  },
  "fleet": {},
  "plan": {}
}
📘

Note

The polyline used in the solution is obtained from the HERE Routing API v8.

Response format

The HERE Tour Planning API returns the polyline as part of the "routeDetails" object for each route segment between the consecutive stops in the solution, in the following format:

{
  "routeDetails": {
    "polyline": "BFspzQy70wTlutCkgpEg4pByjX"
  }
}

In the previous example, the polyline is encoded as a single, compressed string known as a flexible polyline. This encoding method is highly efficient for representing complex line geometries, such as routes or paths, compared to using a series of latitude and longitude coordinates.

📘

Tip

  • The flexible polyline feature is implemented in multiple programming languages, simplifying the integration of flexible polyline encoding regardless of the programming language you are using.
  • If your map rendering library does not support flexible polylines, you can decode the string into an array of latitude and longitude coordinates to represent the route.

For more information, see the flexible polyline documentation on GitHub.

Example: Get route details and overlay the tour on a map

The following steps demonstrate how obtaining route details from a HERE Tour Planning API solution can simplify the process of representing the tour on a map. Using the solution JSON as your single source of information allows you to easily access details about each stop and the routes connecting them.

Obtain a solution containing route details

First, obtain route details by submitting a problem request. The API responds with a solution containing polylines for routes between consecutive stops.

Submit a problem

The following section contains a basic problem JSON, configured for obtaining route details between stops:

Click to expand/collapse the sample JSON
{ 
  "configuration": {
    "routeDetails": [
      "polyline"
    ]
  },
  "fleet": {
    "types": [
      {
        "id": "small",
        "profile": "car",
        "costs": {
          "fixed": 20,
          "distance": 0,
          "time": 0.005
        },
        "shifts": [
          {
            "start": {
              "time": "2023-05-28T08:00:00Z",
              "location": {
                "lat": 52.50935,
                "lng": 13.41997
              }
            }
          }
        ],
        "capacity": [
          100
        ],
        "amount": 10
      }
    ],
    "profiles": [
      {
        "type": "car",
        "name": "car"
      }
    ]
  },
  "plan": {
    "jobs": [
      {
        "id": "Job_1",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.56182,
                    "lng": 13.497167
                  },
                  "duration": 600
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "Job_2",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.534553,
                    "lng": 13.519429
                  },
                  "duration": 600
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "Job_3",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.482275,
                    "lng": 13.502456
                  },
                  "duration": 600
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "Job_4",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.473537,
                    "lng": 13.505414
                  },
                  "duration": 600
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "Job_5",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.463341,
                    "lng": 13.49061
                  },
                  "duration": 600
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "Job_6",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.434003,
                    "lng": 13.466142
                  },
                  "duration": 600
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "Job_7",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.447476,
                    "lng": 13.433062
                  },
                  "duration": 600
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "Job_8",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.458414,
                    "lng": 13.392079
                  },
                  "duration": 600
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "Job_9",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.446407,
                    "lng": 13.36047
                  },
                  "duration": 600
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "Job_10",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.440807,
                    "lng": 13.351399
                  },
                  "duration": 600
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "Job_11",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.441913,
                    "lng": 13.339028
                  },
                  "duration": 600
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "Job_12",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.458232,
                    "lng": 13.338698
                  },
                  "duration": 600
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      },
      {
        "id": "Job_13",
        "tasks": {
          "pickups": [
            {
              "places": [
                {
                  "location": {
                    "lat": 52.457629,
                    "lng": 13.323742
                  },
                  "duration": 600
                }
              ],
              "demand": [
                1
              ]
            }
          ]
        }
      }
    ]
  }
}

Receive a solution

Based on the previous problem, the HERE Tour Planning API returns the following solution:

Click to expand/collapse the sample JSON
{
  "statistic": {
    "cost": 86.32,
    "distance": 49402,
    "duration": 13264,
    "times": {
      "driving": 5464,
      "serving": 7800,
      "waiting": 0,
      "stopping": 0,
      "break": 0
    },
    "consumption": 0,
    "co2Emission": 0
  },
  "tours": [
    {
      "vehicleId": "small_10",
      "typeId": "small",
      "stops": [
        {
          "time": {
            "arrival": "2023-05-28T08:00:00Z",
            "departure": "2023-05-28T08:00:00Z"
          },
          "load": [
            0
          ],
          "activities": [
            {
              "jobId": "departure",
              "type": "departure",
              "location": {
                "lat": 52.50935,
                "lng": 13.41997
              },
              "time": {
                "start": "2023-05-28T08:00:00Z",
                "end": "2023-05-28T08:00:00Z"
              }
            }
          ],
          "location": {
            "lat": 52.50935,
            "lng": 13.41997
          },
          "distance": 0
        },
        {
          "time": {
            "arrival": "2023-05-28T08:19:47Z",
            "departure": "2023-05-28T08:29:47Z"
          },
          "load": [
            1
          ],
          "activities": [
            {
              "jobId": "Job_1",
              "type": "pickup",
              "location": {
                "lat": 52.56182,
                "lng": 13.497167
              },
              "time": {
                "start": "2023-05-28T08:19:47Z",
                "end": "2023-05-28T08:29:47Z"
              }
            }
          ],
          "location": {
            "lat": 52.56182,
            "lng": 13.497167
          },
          "distance": 9971,
          "routeDetails": {
            "polyline": "BG8n9kkDkyizZr2BvlBjXrTjD0KrEkSnG0Z3IgesE8BsEU8GT0F3IkD7L4I0F8GsEwW8QgoBge0F4DwWwR0P8LkIgF4D8B4S8L4_BouB8a0UwM8LwM0K4D4DsE4DoGgFsJ4I0F0F4NkNgUkSwHwRsTgZ8LoQwMsOoQ4SoLgKgyB0tB4XoV8VkSwWoQsOsJkX4NkS0KkN8GsJ0F8GgF4D4D8L8QUkN4DwMkDgFsE4D4D8BgFUgF7BgKrJwCjDkD7GoLU0KkD8Q0FwqBgUgtBwWkS8GsOkDosCgKkhBsEoB08BwCgpDA8QU0UU4XU4coBouBkD4_BoBgPgFkmBgFsnB4DwbwHg3B4DgUwHwb0FwR8G8VkSw-BwWsqCoGsTsY82CsJgjBoBgF4I8f0FgUoBkD8BoGwHgZsJsdoBsE0K4hB0FkS0F4S4D8L4DoL0KkmBkSoiC8VwyC4X82CgPg8B4ck7DkDkN0F0ZwCoL8BgK0F0jBwMs7BkDwMoL8zB8G8foLozB8G4c4IwqB0KgtB8LouBwWoxC0K8uBsOghCgUw3CsJgtB0PonC0U44C4I4mB4IkmBwCoLkI8kBgFwWwbs8D8Q0wCoB8L8BwM4IzF8Q7QkhB7fwlBriBkmB3hB4IjIsYzU4XnV8GnGgtB_sB8zB3wBoLzKwM3IwvBvgB4NrJg8BzoB8G_E0KzF4DnBkIjDojE_xB0jBjNs-C_iBsO_E4hB7L0UnGwM3DkhBnLoGwqBsEkXwH8kB8GwgBwH4c4I0ekI8VgK4XgFsJgFgK0KwR0KwRoagjBkhBopBoLkN8QwWgUwWwlBssBkIsJ4cokB0FwHw-BwyCsO0UgKkNwM0PsTsdgK8Q4I0PsEkI4DkIsJsTsT0oBoVkwB0FkNoagwC8V89B4IsYoLsYgPofwM0U4XgoBsY0oBgF8GoLsT0KoVwRopBwMsiBwCwH8B0F4IsYsO4mBofo2CoVg8BoGoQwH0UgF4NgU41BwCkIsO8pBoL7G8uBzoBssB47Dofo2CsJ3I2D_E"
          }
        },
        {
          "time": {
            "arrival": "2023-05-28T08:36:29Z",
            "departure": "2023-05-28T08:46:29Z"
          },
          "load": [
            2
          ],
          "activities": [
            {
              "jobId": "Job_2",
              "type": "pickup",
              "location": {
                "lat": 52.534553,
                "lng": 13.519429
              },
              "time": {
                "start": "2023-05-28T08:36:29Z",
                "end": "2023-05-28T08:46:29Z"
              }
            }
          ],
          "location": {
            "lat": 52.534553,
            "lng": 13.519429
          },
          "distance": 13720,
          "routeDetails": {
            "polyline": "BG2-jokDw-53Z1DgFrJ4ITwRkIgZofs0CvM0KzKsJzU4S_E0FnGoGrY0ZjN4NvC4DvCgF7L0FjcwHrdkInLkDzoB8LvqB8L3rBwMjmB0KzKkD3ckI7LkD3hBgKjDU_Y8GzKkDzF8BvWoG3NgFvRkI_OkIrEwCrYoQnawWrEsErJsJvCkDrOoQ3NwRnLoQvMkS3NwWvH4NvRokBjI8Q_Y0yBrJgP_JsOnQoV3I7B3DA3c4Dze7BjNnBzFA3NTvHUvHU_OsE7Q8GzKoGnG4DrJoGjIsE3NkI3S0KnGsEzK8GjkC0oBvqBgenlD4pCr5Ck_B_iBgZvvBsiBzKwHzKkIzKwHrgCgyBr7BgtBriBgZrOsJ_O0K3hB0ZrTsOrOkN3IwHoB0KoBwM4Iw1DzPwCnrBkI"
          }
        },
        {
          "time": {
            "arrival": "2023-05-28T09:00:59Z",
            "departure": "2023-05-28T09:10:59Z"
          },
          "load": [
            3
          ],
          "activities": [
            {
              "jobId": "Job_3",
              "type": "pickup",
              "location": {
                "lat": 52.482275,
                "lng": 13.502456
              },
              "time": {
                "start": "2023-05-28T09:00:59Z",
                "end": "2023-05-28T09:10:59Z"
              }
            }
          ],
          "location": {
            "lat": 52.482275,
            "lng": 13.502456
          },
          "distance": 22557,
          "routeDetails": {
            "polyline": "BGwyumkDwxl5Z3QkDrJkD_JsE_YgK3rBgKzFArEnBjIrEsJzjB4DrOArJnBjS_dsEr2BgFjrBsE3ckDnzB8B7VoB3IU3NwC_YkDrTwCrnBwC_YU7LU3SUvbA7GU7GoB7V4DvbgF7QoBrdwCvbnB3XnBrqCnGrnBvC7zB3Dn4B3DrOnB7QnB_sBvCvlBjDzjBvCzPnBvvB3DroD7G3XTnQA_YT_YnBjiDvCz8B7BjcnBzKT7QArO8B7QUrY8B7QwCjcoLrd0K_iBkI3XsEjuCgPjDvlB8BnG0FjN4D_J8B_JUrOTrO_Jn7CvC3XjDnL_Ez8B7BnVnG_2BzF3S7BrErJ3S3IvRrOzZ_TrnB_JvR7G3N3NzZ3I7Q7GzKzKjNjI7GoBzFUzKnBjNnGzU7B7GrEjSrE7VzF_d7BvM7BrJ3NnsCjInpBnQ72C7BzK3D7QvCzP7GjmB7BzK7BjIvHzjB7GzZ7BvHrJjmB3D3N3InkBrOj6BriB_rEnBzF3DvM7G_OnG7GjS_O0KnkB4NnzB8BnGkD3NgKrxB0Kj1BgFna0FzZoGrd8B_JoG3coGrYwCrJkD_JsTr7BsE7QoGvW0FnV4SvtCoBrOAjIvMvHvHnG7GzKvR_iBvH_OvHrO7G_O7Q3hBnG7LjD7G_E_J3DvHjInQvWztB7B_J3D3I_J3SjNna_E_JjNvbvH_J3SzjB3DzFjD_EjSopBv0BgzDvM8anQkhBzF8LriBgrCrOofzjB4uCzK8VzKgU3N8Q7akcr7Bw-BrEgFzjBkmBjhBgjBrnBkrB3NsO7V4X7uBsxBvgBsiB_iB8kBr8D8-DrgCkkCvCwC3NgPvCwCjckcrY0Z39CwhDzZkcjDkDjXoajS0UrJ0KrJoL_JgKrEkInLwHnV8LTsOA4NW-D"
          }
        },
        {
          "time": {
            "arrival": "2023-05-28T09:13:24Z",
            "departure": "2023-05-28T09:23:24Z"
          },
          "load": [
            4
          ],
          "activities": [
            {
              "jobId": "Job_4",
              "type": "pickup",
              "location": {
                "lat": 52.473537,
                "lng": 13.505414
              },
              "time": {
                "start": "2023-05-28T09:13:24Z",
                "end": "2023-05-28T09:23:24Z"
              }
            }
          ],
          "location": {
            "lat": 52.473537,
            "lng": 13.505414
          },
          "distance": 23866,
          "routeDetails": {
            "polyline": "BG6gojkDylk4ZV9DA3NUrO3X4IjrBgZ3csO_J4D_JgF7sC8pBjXwMnfkSjI8GvRkSniCkpCzKoLn4Bo9BrnBkrBvHwHrxB41B7VnzBvR7pBnavjCArEgZjc"
          }
        },
        {
          "time": {
            "arrival": "2023-05-28T09:29:21Z",
            "departure": "2023-05-28T09:39:21Z"
          },
          "load": [
            5
          ],
          "activities": [
            {
              "jobId": "Job_5",
              "type": "pickup",
              "location": {
                "lat": 52.463341,
                "lng": 13.49061
              },
              "time": {
                "start": "2023-05-28T09:29:21Z",
                "end": "2023-05-28T09:39:21Z"
              }
            }
          ],
          "location": {
            "lat": 52.463341,
            "lng": 13.49061
          },
          "distance": 26807,
          "routeDetails": {
            "polyline": "BGoi3ikD44p4Z_YkcAsEoawjCwR8pB8VozB7f0jBzFoG3hBokB7QjrB3SztB3NrnBzPj6B3I_Yv5BzxEvC7G7Vj1BzK3XzPze7a3wBjSnfn4B3iDz8B_oD7LjSn4B7sC_JnQwMjS0F3I8BjDkN3SwCjDkInLge7uBokB31BokBj1BsYnkBsT3cjI3I3N7Q_O3S_J7L3S7VjS7V3IzK3IzKnQ_T7LrO3DrEriBnpB_J7LrsB31BvCjDvCkDrTwbrJ4NrToard0oB3D0F7L8QjcsnBnYoiB"
          }
        },
        {
          "time": {
            "arrival": "2023-05-28T09:48:20Z",
            "departure": "2023-05-28T09:58:20Z"
          },
          "load": [
            6
          ],
          "activities": [
            {
              "jobId": "Job_6",
              "type": "pickup",
              "location": {
                "lat": 52.434003,
                "lng": 13.466142
              },
              "time": {
                "start": "2023-05-28T09:48:20Z",
                "end": "2023-05-28T09:58:20Z"
              }
            }
          ],
          "location": {
            "lat": 52.434003,
            "lng": 13.466142
          },
          "distance": 32113,
          "routeDetails": {
            "polyline": "BGsnjikDots3Z7I0MvC4DvH0KzK0PzFkI3N0U7BkD3IwM7fouBn9B01CzFwH7VsdnQ8Vr0CsyD_J4N3XwgBrJgPnGwMnLgZze08B3Nsd7fghCvMoanB8BjrBg6CnGwMrOsd7ag3BvWssBrTgoBzKwW_J0U7LgZnzBgpDzKoVnL_JzFjDjX3IzjB7L_TnG_sB_O7sC7annCrY_dzKvgBvM3czKwCjS8QvrD8B_JoLvtC8BvM4D3S8L7sCwCzPwCjNwCzPkDrO4D7LgP7pBsE3NoQ_2BsJjhBsE_OkDzK0Zr5C4D7L08BzyG0e_oDgKvbkS3rBsOriBkDvHkNjhB7Q_TzjBzoBzjB7pBjS7VnLjN7lD_yDzFnGzKnL_7B7iCnf_iBrOnQjN_OnkB_nBniCrqCvH3IzUjXna_dnGvHnGjI_EnG7GjIzFvHnL_OzF7G3IrJ_EzFrJrJ_2B74BzyBv0BvRjS7kBvlBrErE7f7f_E_EzFnG_YjczK7LjS_TjSzU_sBrxBvCjDjcze7LjN3rBrxB_Yze7VvgB3IzU3NjX_EvHvRrd_E_J_ErO7Gna_JjuCkN_J2KlL"
          }
        },
        {
          "time": {
            "arrival": "2023-05-28T10:04:21Z",
            "departure": "2023-05-28T10:14:21Z"
          },
          "load": [
            7
          ],
          "activities": [
            {
              "jobId": "Job_7",
              "type": "pickup",
              "location": {
                "lat": 52.447476,
                "lng": 13.433062
              },
              "time": {
                "start": "2023-05-28T10:04:21Z",
                "end": "2023-05-28T10:14:21Z"
              }
            }
          ],
          "location": {
            "lat": 52.447476,
            "lng": 13.433062
          },
          "distance": 35645,
          "routeDetails": {
            "polyline": "BGmjqgkD6881ZiS5SwM_OgP_T4SjcsgCgrCgF8GkSnfgFrJsOrYoL_TsJ3SsO_dwWzyBwMnasJvRsTriB4cvvB0Z_nBkSjX0PzU0oBnuBopBjwBsY3ckI3I0jBnpBwH3IoL7LsO3N4InG8L3I0oB3S03BvWgPnGoQ7GkcvMAnL4D_O8B3X4D_-C4Dv8CwCrqCUjNUzK4DjzCwC_vC4DjuCwCrgCU_O8BvWwCvMkD_J4IzP0U7fgUvlBsJrTsJnVsO7kB8LzewH_TwH_TsEzP4D_OkDnQwCnLgFjSsE7LgFjNkDvM8Gj1BkD3N4IvWgKzPoL_T7G_E_J7G7VjS7QvMnG_E_T_OjDvC_O7LjDn-DiC7I"
          }
        },
        {
          "time": {
            "arrival": "2023-05-28T10:20:43Z",
            "departure": "2023-05-28T10:30:43Z"
          },
          "load": [
            8
          ],
          "activities": [
            {
              "jobId": "Job_8",
              "type": "pickup",
              "location": {
                "lat": 52.458414,
                "lng": 13.392079
              },
              "time": {
                "start": "2023-05-28T10:20:43Z",
                "end": "2023-05-28T10:30:43Z"
              }
            }
          ],
          "location": {
            "lat": 52.458414,
            "lng": 13.392079
          },
          "distance": 39668,
          "routeDetails": {
            "polyline": "BG2lkhkDwo8zZhC8IkDo-DgP8LkDwCgUgPoGgF8QwM8VkSgK8G8GgFsJvMgP3NwgB3XkmBzZ8fvWoVvRwMvM4DrEwH3IoGnG4I_JwCjD0U7a4I_J8GjI4IjN0K3N4NjS08BjuCkIzK0Unfo9BvhDsOjXgKzPkDnG8BjIgP3XoG_JwH7LkNzUkNzUsTzegoB3_BkIjN4I_T0FzP0K3c4S_xBsTv0B0e3zC0F_OoQvvBwMjhBsJzZ8GvR8GrTsEnLoG3SjD7L3D3I3N3czUrnBjSvgB8G_YwC_O8BrOA_JnB7Q7B3N3DvRvCjSnBzPUjNwC3SwHztB8BjNsEvboB3NwC_xB8BvvBwC79BU7GU3SUjNU3SU_JwCvvBoB3wBUnVnB7a7BvR7Q3uCvM36B7BzKjDnQ3DjXnGztBjD7VvCvR7G_xBrJvhD7G7zB3DzZjIvvB_J_2B_TjzC_JzoB_E7VkNjIkc_R"
          }
        },
        {
          "time": {
            "arrival": "2023-05-28T10:36:02Z",
            "departure": "2023-05-28T10:46:02Z"
          },
          "load": [
            9
          ],
          "activities": [
            {
              "jobId": "Job_9",
              "type": "pickup",
              "location": {
                "lat": 52.446407,
                "lng": 13.36047
              },
              "time": {
                "start": "2023-05-28T10:36:02Z",
                "end": "2023-05-28T10:46:02Z"
              }
            }
          ],
          "location": {
            "lat": 52.446407,
            "lng": 13.36047
          },
          "distance": 42481,
          "routeDetails": {
            "polyline": "BG4n6hkDoiuxZjcgSjNkI_dj7D7Grd7kBj5EjD7L_E_TjI_iBT3D7GjcvHnf_JjmBzFrYjD_O3DvWvCvWvC3XT3InBrnBUzP0Kr8DwC_dkDjmBwCriBoG3uC8BjX7B7VnG7VTjDzKvbvHjSnBvHnLrdrJ_Y7GnL7VnarJ3IjmBvvBjN7Q7kB3wB3hBjrB3I7LjInL3I7LniC77C3cnpBzKvR7QvgBr2B3sD_O_d7pB7xCrT3mBzKnV7B3DvM_YnQvgBvH_OzF7L3DvH3N_drJvWvH3S3DrJrE7L_J7a_RyH"
          }
        },
        {
          "time": {
            "arrival": "2023-05-28T10:49:29Z",
            "departure": "2023-05-28T10:59:29Z"
          },
          "load": [
            10
          ],
          "activities": [
            {
              "jobId": "Job_10",
              "type": "pickup",
              "location": {
                "lat": 52.440807,
                "lng": 13.351399
              },
              "time": {
                "start": "2023-05-28T10:49:29Z",
                "end": "2023-05-28T10:59:29Z"
              }
            }
          ],
          "location": {
            "lat": 52.440807,
            "lng": 13.351399
          },
          "distance": 44066,
          "routeDetails": {
            "polyline": "BGovihkD-mvvZ7wByU_Y0K_7B0ZjS_drJ3S_OnkB03B7kBkIrEwM7BsTvMs2B_iBkDvC7Lnfjc3pC_Tj1B7QrsBnVr2B7G_OrJ3NjI3InLjInLrEjNvC7LAjhBT_JAzKAjIgF3IjD3DnBnL_EjInGrO3SvHzKzK7QnVnfrJrOnQ_TrErE_JnL3D3DgPnQ8BnB6IjJ"
          }
        },
        {
          "time": {
            "arrival": "2023-05-28T11:02:39Z",
            "departure": "2023-05-28T11:12:39Z"
          },
          "load": [
            11
          ],
          "activities": [
            {
              "jobId": "Job_11",
              "type": "pickup",
              "location": {
                "lat": 52.441913,
                "lng": 13.339028
              },
              "time": {
                "start": "2023-05-28T11:02:39Z",
                "end": "2023-05-28T11:12:39Z"
              }
            }
          ],
          "location": {
            "lat": 52.441913,
            "lng": 13.339028
          },
          "distance": 45654,
          "routeDetails": {
            "polyline": "BGuo3gkDkv8uZ5IkJ7BoB_OoQnGzK_dvgB_EzFjX_YzFvH7pB3_BzjBn4B3pC75DjIjNrT7foGjIkNvMkN3IkIzF0tB_dgF3D0e7V0KvH0F3D0KvHsdzU4DvCsJnGoGrEgK7G8GrEwRvMoQ7LokBrYwoCjwB0F3D8BnBkSvM4IzFjInfrd70D"
          }
        },
        {
          "time": {
            "arrival": "2023-05-28T11:18:30Z",
            "departure": "2023-05-28T11:28:30Z"
          },
          "load": [
            12
          ],
          "activities": [
            {
              "jobId": "Job_13",
              "type": "pickup",
              "location": {
                "lat": 52.457629,
                "lng": 13.323742
              },
              "time": {
                "start": "2023-05-28T11:18:30Z",
                "end": "2023-05-28T11:28:30Z"
              }
            }
          ],
          "location": {
            "lat": 52.457629,
            "lng": 13.323742
          },
          "distance": 48344,
          "routeDetails": {
            "polyline": "BG435gkDkzkuZAAsoDjpCoLzFoLwb8GkSkD0KsJ8VkDoG8G4IsEkDgFT0K4NgKkNwC4DsYsiBgF8GoV4c4mB03B8L8QsTwbwRriBkNzZsOvbsd74BsJjS8Qnf8G_J0P_T4D_E0FvHsd_nBkIzK4IjNgK_J4IzFsETgFwCkDwC8Q4SsJ8L0F4D4NgFsEoBoBrO8B_iB8B7a8BvRoBzF0Fze0FrToGjS4c_qC0e_qCwC7GwHrTgFzK8G_OkXv0BgF3NkInVwCzKgF_JsTnzB8GjS8L7fkIjNwHjSkXz8B4N_iBkDvH0FrOgPzjB8GvRgFnLkhBjzCsEnLoL_d0FrOgFvHoBnGkDvRkckhB8GkIsE4IsW4c"
          }
        },
        {
          "time": {
            "arrival": "2023-05-28T11:31:04Z",
            "departure": "2023-05-28T11:41:04Z"
          },
          "load": [
            13
          ],
          "activities": [
            {
              "jobId": "Job_12",
              "type": "pickup",
              "location": {
                "lat": 52.458232,
                "lng": 13.338698
              },
              "time": {
                "start": "2023-05-28T11:31:04Z",
                "end": "2023-05-28T11:41:04Z"
              }
            }
          ],
          "location": {
            "lat": 52.458232,
            "lng": 13.338698
          },
          "distance": 49402,
          "routeDetails": {
            "polyline": "BGwj4hkD8qntZktBk6B_E4N_EgPzFgUjDgKvCgP8B0P8B4cU4IUsJsJ8mFU0PoB0UUgKoBgtBoBwWToa8BsiBoBsTkDgeoBsT8Bge8B4NkDk_BsEo2CkDg8BoBsYUgK3SoB"
          }
        }
      ],
      "statistic": {
        "cost": 86.32,
        "distance": 49402,
        "duration": 13264,
        "times": {
          "driving": 5464,
          "serving": 7800,
          "waiting": 0,
          "stopping": 0,
          "break": 0
        },
        "consumption": 0,
        "co2Emission": 0
      },
      "shiftIndex": 0
    }
  ]
}
📘

Note

Each stop on the route (X) has a polyline that shows the path taken from the previous stop (X-1) to the current one. For example, the polyline for stop 1 represents the route from the starting point (the depot) to stop 1.

Next steps

You can use solution JSON files with polyline details to overlay tour details onto a map by using a map rendering web SDK like the HERE Maps API for JavaScript. For a practical example, see Efficient Fleet Routing: Mastering 8-Hour Depot-to-Depot Tours with HERE Tour Planning API.