1

I have a problem with Here Maps Routing API v8.

Altough the documentation states that: but a request may specify many more intermediate waypoints with via as well. See Route Via Intermediate Waypoint for examples.

... I am at a loss how to create a request with one origin/destination and two or more waypoints. In v7 we had a single waypoints parameter which allowed unlimited waypoints.

In v8, I tried something like: &via=52,13;51,14&.. to send two via points, but that doesn't work.

The v8 documentation (which feel rushed/unfinished) doesn't help, and neither their only example, which only illustrates the use of a single via waypoint.

Help please!!! .

Vlad Rusu
  • 13
  • 3

1 Answers1

0

You need to add as many times via={lat},{lng} as you have waypoints:

# Note: line breaks and spaces are for readability only (they need to be removed)

https://router.hereapi.com/v8/routes?
  origin=52.550464,13.384223
  &transportMode=car
  &destination=52.477545,13.447395
  &via=52.529791,13.401389
  &via=52.513079,13.424392
  &via=52.487581,13.425079
  &apikey={YOUR_API_KEY}
Michel
  • 26,600
  • 6
  • 64
  • 69
  • Thanks! Do you also know how to send multiple **via**s through JS API? I am refering to [this example](https://developer.here.com/documentation/maps/3.1.15.1/dev_guide/topics/routing.html). – Vlad Rusu May 27 '20 at 07:36
  • You're welcome. For multiple `via` through the JS API, please see [this S.O. answer](https://stackoverflow.com/a/62094618/3120193) – Michel May 30 '20 at 10:43