Tomtom route api routeType parameter not working - tomtom

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.

Related

Zip Codes along driving route

I know that there is a Google API that can provide directions and/or driving distance between 2 points.
Is there a way to get all of the zip codes that the route passes through, or within a specified distance from the route?
The application has to do with deliveries. E.G. a truck is making a delivery from point A to point B. I would like to get all of the zip codes along the route in order to determine which other deliveries can be done in the same trip.
I've only found one post for something similar, but it's old, the links aren't valid any more and I would think there is something else out there.

Deeplinking complex route in Here WeGo

For our use case, we need a turn-by-turn navigation on a mobile device but using a custom route.
Please let me know if the following usage scenario is possible:
Given an array of points (lat/long) that the route needs to pass through, get a route using CalculateRoute.
Create a deeplink for HERE WeGo (e.g. iOS) using the sequence of waypoints obtained in step #1
Navigate turn by turn in HERE WeGo along the route
So far I was successful in #1 but could not create a deeplink with the same route for HERE WeGo. When I create a link, the app simplifies the route to only include origin and destination points and omits all "via" points.
Would appreciate advice on this.
In general passing the waypoints one after the other should open the route with the intermediate points (at least on wego.here.com) , not so sure if this work out of the box in HERE WE Go https://developer.here.com/documentation/deeplink-web/dev_guide/topics/share-route.html

Drag route anywhere using Maps API

I want to write an application that gives me the exact route of a subway.
When you use Google Maps it just connects two stops linearly, but not the actual way.
Is there a way to move a route anywhere on a map without being bound to roads?
If there's any solution (doesn't have to be with the Google Maps API) please let me know.
Edit:
Example
Google shows the train route like the brown line, but the train actually drives the blue line. What I would like to do is get the blue line so that I can get the coordinates of the route and calculate the curves and elevation.
I know that I could add like 50 waypoint and get get a "fake" route with them, but I would like to have it automatic and not done by hand.
To show the transit directions (subway, bus, tram, etc.) Google Maps uses the data provided by transit agencies in the form of GTFS feeds. This is a responsibility of the agency to provide a detailed shape of the route for the transport according to the GTFS specification. You can have a look at GTFS documentation to figure out how does it work:
https://developers.google.com/transit/gtfs/
https://developers.google.com/transit/gtfs/reference/#general_transit_feed_specification_reference
I hope this helps.

Here FindSequence Limit Waypoint

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

Google Directions API (Transit mode) returns only one alternative route per request

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

Resources