Optimize for HIKE and CAR return same results

Hi
I am new here. please consider.

I have set of points. Already in order for hiking.
you can see them here: (if you switch to hike)
Optimized for Hiking

(asking why in BING and not grapghhopper ? because I get this error message:
GraphHopper API offline? [Refresh]
Status: error
for some reason…)

When I run optimize=true with vehicle=car or with vehicle=hike it generates the same result.
Optimization ask to reorder the points as car…

this is the optimization request: (API KEY should be replaced)…
Optimization request

any idea what am I doing wrong?

many thanks

Have not tried it with the vehicle parameter but with the profile parameter this works, e.g. also on GH Maps:

(Please always only use documented parameters)

Also note that some of your points are inaccessible for car and the route will look strange.

thank you very much for the reply.

first - I know my route for car looks strange. I did it intentionally to study the optimization process.

per your advise - I switched to profile=car vs profile=hike
results are different now !!!

but I think something is wrong with the hike optimization.

This is the optimized route:
Optimized route for profile=hike

I changed the order of points 2 & 3
and I ran the optimization with profile=hike
I expected to get results advising me to switch points 2 and 3 back - but I got this:

“points_order”:[0,5,1,4,2,3,6]

and if I follow the optimization advise I get this route which looks wrong…

Optimized? I does not look like…

What am I doing wrong ???

another question please -
in the documentation it says:

Point → Array of strings
The points for which the route should be calculated. Format: latitude,longitude. Specify at least an origin and a destination. Via points are possible. The maximum number depends on your plan.

How can I tell the directions API to start navigation from my current location ?

thank you very much !!!

Indeed. Something is wrong here. Will investigate and let you know when it is fixed.

This should be fixed now. Can you confirm?

yes !!! this is fixed now !!! thank you .

and… How can I tell the directions API to start navigation from my current location ?

Glad to hear this :slight_smile:

Navigation is a different thing. You could have a look into maplibre-navigation-android which is the successor of our fork.
Or if you prefer a JS-only solution have a look into this prototype.

yes !!! confirmed - fixed like a charm

i asked another question, if may I,

how to tell the directions api to start the navigation from my current location in the http request…

many thanks !!!

Not sure if you saw my previous response. Navigating is a different thing. You could just include your current location in the http request. How to get this current location depends on the platform you are developing it is different for Android, iOS and the browser.

thank you !!!
i am not an android developer. Just playing around with some html etc…

I was looking for something like this…

sample URL with my location - but I guess you might not have this feature.

thank you !!

You can try Graphhopper Maps and click the arrow to let you navigate.

Powered by Discourse