简体   繁体   中英

Here API findpickups example doesn't work

We are trying to use the findpickup api to find the best route for several waypoints. Despite the fact that we trying to understand how the pickup and drop params exactly work we were not able to get a successfully response from the example at https://developer.here.com/documentation/routing-waypoints/dev_guide/topics/example-pickup.html

https://wse.ls.hereapi.com/2/findpickups.json?mode=fastest;car;traffic:disabled&start=waypoint0;50.115620,8.631210;pickup:GRAPEFRUITS,value:1000&departure=2016-10-14T07:30:00+02:00&vehicleCost=0.29&driverCost=20&maxDetour=60&restTimes=disabled&end=waypoint7;50.132540,8.649280&destination0=waypoint1;50.118578,8.636551;drop:APPLES,value:30&destination1=waypoint2;50.122540,8.631070;pickup:BANANAS&destination2=waypoint3;50.128920,8.629830;drop:BANANAS,value:30&destination3=waypoint4;50.118654,8.619956;pickup:APPLES&destination4=waypoint5;50.123998,8.640626;drop:PEACHES,value:50&destination5=waypoint6;50.130299,8.613031;pickup:PEACHES&apiKey={YOUR_API_KEY}

It is always complaining not finding a match for a street.

After finding a similar question on stackoverflow describing this problem Here Map findpickups Cannot match onto a road link with 1000.0m search radius

we switched to the alternative domain. But now the entire pickup/drop thing confused us even more after reading the error message that drop-off point is missing. Regardless where we are changing params for pickup/drop it stills complains that a contraint for pickup is not fullfilled. Would be awesome if someone has any idea what is going wrong with the example from the HERE Docs. And more importantly if someone can explain how the pickup/drop implementation actually works.

@HERE developer support

Thanks a lot for your reply.

My new additional notes would be too long as a comment. So I edited my questions with further information for describing the actually problem we have.

Obviously makes sense that GRAPEFRUIT has to be removed in a pickup waypoint. We already tried that. Sorry that we didn't mentioned that.

The thing is that in our use case will drop or pickup multiple items on each waypoint. According docs this must work. https://developer.here.com/documentation/routing-waypoints/dev_guide/topics/api-reference-type-waypoint.html .

Unfortunately it doesn't work. See following request https://fleet.ls.hereapi.com/2/findpickups.json?driverCost=20&mode=fastest;car&vehicleCost=0.20&start=wp1;50.41256,8.02943&destination1=wp2;50.0766,8.22699;pickup:item1&destination2=wp3;50.07735,8.22185;pickup:item2&destination3=wp4;50.06563,8.19155;drop:item1,value:100;drop:item2,value:100&end=wp5;50.41256,8.02943&apikey=YOUR_API_KEY

Would love to get some hints and a solution for our use case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM