I need to get an optimized sequence of a route with up to max 120 waypoints.
I was trying to use "Here API" but with trial plan (I guess) even though I enter 10/20/30/40 destinations (waypoints), it always calculates only the top 5 destinations.
Is a plan problem?
thanks!
Maurizio
I'm using it successfully with up to 119 waypoints. I'm a customer (not trial).
Endpoint I'm using: https://wse.api.here.com/2/findsequence.json
Hope it helps
Related
I am working with Telematics API https://fleet.ls.hereapi.com/2/calculateroute.json to calculate the toll costs. Can I please ask if anyone has used or aware if there is a special parameter to denote one way or round trip. I am using waypoints to represent round trip as in waypoint0 = source, waypoint1=destination, waypoint2=source to represent my round trip. The values returned are high compared to the ones indicated by local teams who use that toll regularly
As example 59.9133301,10.7389701 -> 60.6244351,11.3831208 -> 59.9133301,10.7389701 shows 816 NOK but real value is only 660. A one way from 59.9133301,10.7389701 -> 60.6244351,11.3831208 shows 340 NOK which may be right
So is there another way on API to ask for toll cost combined for both directions?
Thank you for your assistance
Please share you complete request. I am unable to reproduce the issue.
You can refer to these example request:
Round Trip request :
https://fleet.ls.hereapi.com/2/calculateroute.json?jsonAttributes=41&waypoint0=59.9133301,10.7389701&detail=1&waypoint1=60.6244351,11.3831208&waypoint2=59.9133301,10.7389701&maneuverAttributes=none&linkAttributes=none,sh&legAttributes=none,li¤cy=NOK&departure=&tollVehicleType=2&trailerType=0&trailersCount=0&vehicleNumberAxles=2&trailerNumberAxles=0&hybrid=0&emissionType=5&fuelType=petrol&height=1.67m&trailerHeight=0&vehicleWeight=1739&limitedWeight=1.739t&disabledEquipped=0&minimalPollution=0&hov=0&passengersCount=2&tiresCount=4&commercial=0&heightAbove1stAxle=1m&width=1.8m&length=4.41m&mode=fastest;car;traffic:disabled&rollups=none,country;tollsys&&tollPass=transponder&apikey=<apikey>&jsoncallback=parseRouting
Result TollCost: 244.8
One way request :
https://fleet.ls.hereapi.com/2/calculateroute.json?jsonAttributes=41&waypoint0=59.9133301,10.7389701&detail=1&waypoint1=60.62544,11.37563&maneuverAttributes=none&linkAttributes=none,sh&legAttributes=none,li¤cy=NOK&departure=&tollVehicleType=2&trailerType=0&trailersCount=0&vehicleNumberAxles=2&trailerNumberAxles=0&hybrid=0&emissionType=5&fuelType=petrol&height=1.67m&trailerHeight=0&vehicleWeight=1739&limitedWeight=1.739t&disabledEquipped=0&minimalPollution=0&hov=0&passengersCount=2&tiresCount=4&commercial=0&heightAbove1stAxle=1m&width=1.8m&length=4.41m&mode=fastest;car;traffic:disabled&rollups=none,country;tollsys&&tollPass=transponder&apikey=<apikey>&jsoncallback=parseRoutingResponse
Result toll cost 113.6
Back to source
https://fleet.ls.hereapi.com/2/calculateroute.json?jsonAttributes=41&detail=1&waypoint0=60.6244351,11.3831208&waypoint1=59.9133301,10.7389701&maneuverAttributes=none&linkAttributes=none,sh&legAttributes=none,li¤cy=NOK&departure=&tollVehicleType=2&trailerType=0&trailersCount=0&vehicleNumberAxles=2&trailerNumberAxles=0&hybrid=0&emissionType=5&fuelType=petrol&height=1.67m&trailerHeight=0&vehicleWeight=1739&limitedWeight=1.739t&disabledEquipped=0&minimalPollution=0&hov=0&passengersCount=2&tiresCount=4&commercial=0&heightAbove1stAxle=1m&width=1.8m&length=4.41m&mode=fastest;car;traffic:disabled&rollups=none,country;tollsys&&tollPass=transponder&apikey=<apikey>&jsoncallback=parseRoutingResponse
Result tollcost 131.2
Toll cost of route (1) = toll cost of route (2+3)
I am running the TomTom route api.
This is the url.
https://api.tomtom.com/routing/1/calculateRoute/7.841327000000001,6.745921000000001:7.840205322,6.746850516?key=mykey>&routeType=fastest
The distance shows 176 meters.
When i run the same api changing the routeType = 'thrilling', as shown below
https://api.tomtom.com/routing/1/calculateRoute/7.841327000000001,6.745921000000001:7.840205322,6.746850516?key=mykey>&routeType=thrilling
I still get the same distancee of 176 mtr
But the GUI website for tomtom route shows different results.
I looked for the route between same coordinates on the Tomtom GUI for route.
First: (fastest)
https://mydrive.tomtom.com/en_gb/#mode=routes+viewport=7.84061,6.74596,17.97,0,-0+routes=%7B%22departure%22:true,%22traffic%22:true,%22routeType%22:%22FASTEST%22,%22travelMode%22:%22CAR%22,%22points%22:%5B%22hw~7.84132,6.74592~A~Kogi,%20NGA%22,%22hw~7.8402,6.74685~A~Kogi,%20NGA%22%5D,%22avoidCriteria%22:%5B%5D%7D+ver=3
I got distance as 190 yards
Second: (thrill)
https://mydrive.tomtom.com/en_gb/#mode=routes+viewport=7.83847,6.74261,15.93,0,-0+routes=%7B%22roundTrip%22:true,%22departure%22:true,%22traffic%22:true,%22routeType%22:%22THRILLING%22,%22travelMode%22:%22CAR%22,%22hilliness%22:%22NORMAL%22,%22windingness%22:%22NORMAL%22,%22points%22:%5B%22hw~7.84132,6.74592~A~Kogi,%20NGA%22,%22hw~7.8402,6.74685~A~Kogi,%20NGA%22%5D,%22avoidCriteria%22:%5B%22ALREADY_USED_ROADS%22%5D%7D+ver=3
I got distance as 3 miles.
My main concern is it is showing correct results while using mydrive.tomtom.com , but through API, the routeType option is not working.
Please help
In the second link you have selected "Rount trip". If you deselect it then you have the same result. But if you want to achieve simmilar result via API call then just copy first point and add after colon as a third point.
It is hard to get different results with such short distance.
Im trying our different flight api's from sabre, I understand from reading the data Im getting back is limited in development but Im not sure if it really can be THAT limited or its me doing something wrong.
1: InstaFlights Search
First I use the citypairs lookup to show city pairs, then use them for the instasearch,
The problem is unlike I use NY or London (there were 2 other cities working fine), for almost ALL other cities, Im getting no response.
I know data is limited but since the citypairs api already returns VERY limited data, but is it really THAT limited? Feeling like I must be doing something wrong because I cannot image, that api to work (in dev) only for 3 cities on 3 different dates :-/
destination api
here I use first the supported cities api, then use results to use the multi airports api, then use that for destination api.
Again, same here, only 2/3 cities actually work. Since in the destination api, UNLIKE the instaflights api, the changes of 'matches' are higher as any destination could be shown for the picked origin. HERE AGAIN almost no results, BUT for about 3 cities.
If anyone who has some experience with sabre, could help out it would be great- just trying to figure out if its me whos using it wrong or no. Thanks!
Can you please provide the city pairs that seem to be failing for you? I just did a test of both APIs (InstaFlights and DestinationFinder) and was able to obtain results with the city pairs provided there. I changed the point of sale to FR and obtained PAR-ATH, and that worked. Also worked with ABE-MCO which is the first city pair I obtain when using POS US.
The testing environment for this API but you should be not limited to just three cities.
I have an application that requires having many (sometimes over 50) dynamic routes added to the google map. Using the DirectionsService, I am able to add right around 10 routes or so before the requests start to fail with the status of "Over Query Limit". I was wondering if anyone has encountered this situation and has found a way to deal with it. It seems that even if I pause between requests, I am still failing for anything over the first 10. Not sure if there is a request limit for a single map instance?
Any help with this would be much appreciated!
According to the documentation, you can only get up to 2 requests per second. If your code do that slower than 2 per second, that should be fine.
I used the setInterval(function(){.... to test it and yup, if you do it slow enough it seems to work.
http://jsfiddle.net/bd1qdLv3/
I have built an small application which calls the Google Directions API in Transit mode. It works - nevertheless it returns only one possible route, so it shows no alternatives. Usually I expect 3-4 options to choose from.
Example:
http://maps.googleapis.com/maps/api/directions/json?origin=bieberstrasse,+dusseldorf&destination=norf,+neuss&sensor=false&mode=transit&departure_time=1399399424
The returned JSON structure has the expected "routes" array, but this array always has only one element. I have tried it with addresses in Brazil and Germany - it doesn't matter the country, I only get one single route.
Did I miss some parameter? Could someone help me with it?
If you want alternative routes, specify the request parameter alternatives=true:
http://maps.googleapis.com/maps/api/directions/json?alternatives=true&origin=bieberstrasse,+dusseldorf&destination=norf,+neuss&sensor=false&mode=transit&departure_time=1399399424