문제

I have been working with Bing API and it works perfect and outputs latitude and longditude very well

            // However I need the driving distance . . . I thought it should be  result.getDrivingDistance (
            System.out.println(result.getDrivingDistance); // There is no such a command
           // What should I do to get the distance from the response ?

Is there any way of getting the driving distance? I have been reading documentation but was not able to find a method for this ?

도움이 되었습니까?

해결책

Routes API. The Routes API is for calculating driving directions. The Routes API allows you to get route distance calculations, route geometry and step-by-step directions via driving, walking or traffic based algorithms. You can also pass in up to 25 points on your route to calculate a multiple stop route in a single request.

sample:

http://dev.virtualearth.net/REST/v1/Routes?waypoint.1=waypoint1&waypoint.2=waypoint2&distanceUnit=mi&o=json&c=en-GB&key=key

Take a look at the Microsoft documentation:

http://msdn.microsoft.com/en-us/library/ff701717.aspx It's easy to make this in Java.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top