0

Before all, I apologize for my bad English.

Well, my question is:

How can I draw a line/path given from the routing rest API of here maps?

I've been reading the docs and searching everywhere but I couldn't find anything.

For example, I have this request

https://route.ls.hereapi.com/routing/7.2/calculateroute.jsonapiKey{API_KEY}&waypoint0=geo!20.6981862304,-103.457267674&waypoint1=geo!20.5746776890814,-103.12193707481&mode=fastest;truck;traffic:disabled&limitedWeight=30.5&height=4.25&shippedHazardousGoods=harmfulToWater

And in the JSON/geojson that I got I can loop through the coordinates given from the steps, I imagine that I can make a LineString with these coordinates but I don't know exactly how.

If anyone has an idea of how can I get this I'll be really grateful.

1 Answers1

0

I almost forgot this question and now that I've solved it, I realize it was very simple. There is a url to get an image map with the route, the last one I had use is to get the directions as well as the steps, deuation, etc.

The correct url looks like:

https://image.maps.ls.hereapi.com/mia/1.6/routing?apiKey=MYKEY&waypoint0=lat,log&waypoint2=lat,long&waypoint[n]=lat,long&t=5&z=11

and this url return an image with the route.