To create a polyline, I go to
…/dev/#/api-docs/v2/directions/{profile}/json/post
(directions in JSON format on openrouteservice dot org but as a new user I can post only 2 links)
in PATH PARAMETERS, I set profile to foot-walking
in Body, I set elevation to true
I click on call action
I download the response
in the response there is this geometry:
ghrlHkr~s@ogU?D?IC?qEL?I??IA?y@O[yAYsAICSKAIuA_@Og@G?A??SA?K@?C??_@PMuBp@@AIHCQ?q@uH}FC?IG?KC@MC?MAEO?GSAGS?EIoARQA?EC@Eg@uIp@AM??MI[mGwBAMUC?WK@yH?C??C?K@?AY?Eq@??W?AI?_BLtA]BTQoDjA
When I debug decoding using Swift Polyline, it fails with an uneven number of coordinates:
pairs of (lat,lon), the last is only a lat, then the data ends. Apart from the ending, the data appears to be correct.
When I use this tool Interaktives Hilfsprogramm für die Polyliniencodierung | Google Maps Platform | Google Developers
to decode, it shows something in Africa and coordinate pairs that also appear to be broken.
Am I doing something wrong or is Openrouteservice returning a broken polyline?
Best regards
Gerd
P.S. parameters:
{
"metadata": {
"attribution": "openrouteservice dot org | OpenStreetMap contributors",
"service": "routing",
"timestamp": 1677275357969,
"query": {
"coordinates": [
[
8.681495,
49.41461
],
[
8.686507,
49.41943
],
[
8.687872,
49.420318
]
],
"profile": "foot-walking",
"format": "json",
"elevation": true
},
"engine": {
"version": "6.8.0",
"build_date": "2022-10-21T14:34:31Z",
"graph_date": "2023-02-07T11:34:20Z"
}
}
}