I am trying to get polyline for a route. I use valhalla turn-by-turn route API and pass multiple coordinates, but as a response I get encoded polyline for each leg, not for the whole route. Is there an option to get polyline for the route or to merge polylines of legs somehow? Thank you in advance.
I found out that there are types for locations in valhalla API, such as
break
andthrough
. When passing coordinates as a query string for the request, one must speicfy typetrough
if this is a transit location. By default all locations are of typebreak
, which means valhalla creates a polyline for each leg.