Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Route Optimization API? #26

Closed
MaryCooperGD opened this issue Sep 8, 2017 · 1 comment
Closed

How to use Route Optimization API? #26

MaryCooperGD opened this issue Sep 8, 2017 · 1 comment

Comments

@MaryCooperGD
Copy link

Hi, I've installed the js client and I would like to use Route Optimization API, but I'm not sure how I can use it.
I've required the whole client using require('graphhopper-js-api-client') and tried to call Routing with the parameter optimize:true as explained here :

var ghRouting = new GraphHopper.Routing({key: defaultKey, host: host, vehicle:profile,elevation:false,optimize:true})

The response I get are the points not sorted, they are in the order I've added them.
I've also tried using
var ghRouting = new GraphHopper.Optimization({key: defaultKey, host: host, vehicle_types:profile,elevation:false,calc_points:true})

But doesn't work. In the docs for Route Optimization API is not explained how to specifiy parameters for the constructor, so I'm a bit stuck.

@karussell
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants