API directions answer with multiple mode - mode

how can i get from una url API directions more then one mode? for example have in the same answer the time fore the mode transit and the time for the mode walking

There is no way. You have to make two requests with different modes.

Related

Get Polyline with the Here Tour Planning API

We're using the Tour Planning API because it seems to be the only routing API that supports time windows, however according to the documentation the Tour Planning API does not return the route polyline.
Is there another way to get the route polyline along with the ordered stops?
Here Tour Planning and HERE routing are based on the same data; therefore, the tours returned are realistic. In the tour results, the sequence of stops also includes breaks if there are. While requesting the routes from routing API, use all the stops as waypoints (via) with duration at that stop (stopDuration). The resulting route should closely match the tour plan. Depending on the current traffic situation or other factors, there can be a minor difference.
Learn more about waypoint routing here: https://developer.here.com/documentation/routing-api/dev_guide/topics/waypoint.html
An example of routing request with waypoints and stopDuration looks like this: https://router.hereapi.com/v8/routes?routingMode=fast&transportMode=car&return=polyline,summary&departureTime=2022-08-01T08:00:00&origin=52.530914,13.384966;radius=100&via=52.525331,13.369311;radius=100!stopDuration=360&via=52.503011,13.341190;radius=100!stopDuration=1200&destination=52.530914,13.384966;radius=100

Why calculateRoute never returns route for mode shortest and type truck?

Our team encountered a problem with HERE API while testing routing with Calculate Route for mode=shortest and type=truck.
We've also tested this not only in our implementation but also on the ref client here just by dragging points to different locations with the same result.
Example of REST request:
https://route.api.here.com/routing/7.2/calculateroute.json?app_code=456&app_id=123&jsonattributes=41&language=pl-pl&maneuverattributes=po,ti,pt,ac,di,fj,ix&metricsystem=metric&mode=shortest;truck;traffic:disabled&routeattributes=sh,gr&waypoint0=geo!stopOver!52.913486,6.693136&waypoint1=geo!stopOver!52.002047,19.921338
I would expect this combination to return successful result or message about this being exception. Also, proper remark in docs would be greatly appreciated.
Currently truck routing support Fastest and Balanced mode only.
When calculating truck routes, we recommend to always use the fastest Routing Mode Type.
please see the documentations for your reference.
https://developer.here.com/documentation/routing/topics/routing-mode-parameter-combinations.html
https://developer.here.com/documentation/routing/topics/filtering-truck-routing-requests.html
Hope this helps!!

Google Directions Api on driving bus mode

I would like to use Google Directions Api on 'DRIVING' mode, but I want to know the best route driving a bus and not a car.
I'm not talking about 'TRANSIT' mode. I don't want to take a bus but drive it.
Does anybody know if that option is possible?
As geocodezip mentioned in the comments, that functionality is just not possible.
If you choose to set the mode property within the Direction Service API to 'DRIVING', GM will assume you want standard driving directions for a motor vehicle (car).
Here's an extract from their documentation concerning possible travel modes for the Directions Service API:
The following travel modes are currently supported:
DRIVING (Default) standard driving directions using the road network.
BICYCLING bicycling directions via bicycle paths & preferred streets.
TRANSIT directions via public transit routes.
WALKING walking directions via pedestrian paths & sidewalks.
So to answer your question. No, unlike the TRANSIT option, there's no way to specify a form of vehicle you would like to use within the 'DRIVING' option of the Direction Service API.
But that might change one day.

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.

OVI Map Route API Over HTTP

I'm doing some research on route distance calculation APIs, and I came across this API from Ovi/Nokia: http://api.maps.ovi.com/devguide/getting_started.html#Services
Does anyone know if they have an equivalent REST API that can be used outside of a client browser scenario?
If not, what's the best option for route distance calculation APIs? I've looked into Google, Bing, and MapQuest, but I would like to be able to use it internally without a daily rate limit.
Thanks for your help.
There is the maps image API, if showing the routes as images are sufficient. This page has the complete list if Nokia Maps APIs.
I do not want to repeat what is done, so please refer to the Nokia API reference, but to be more accurate use distance method from nokia.maps.geo.Coordinate. The complete documentation is here
Click here!

Resources