Valid GeoJSON response

i was wondering how do i transform the default answer to a valid geojson?
because neither leaflet or geojson.io understand the answer using Routing API
example:
curl "https://graphhopper.com/api/1/route?point=-34.608053,-58.459734&point=-34.709718,-58.675684&vehicle=car&locale=es&debug=false&points_encoded=false&key=[mykey]"

The paths[i].points is already a GeoJSON if you use points_encoded=false. For the default (points_encoded=true) you need to decode the points and for that the easiest way is to use our JS client which then returns again a GeoJSON in paths[i].points

This topic was automatically closed after 12 days. New replies are no longer allowed.