简体   繁体   中英

How to get multiple routes from source to destination using bing maps api in python?

I have written a python code which generates the latitude and longitude of source and destination point. Now I want to get multiple possible routes between the two points. How can I obtain it using bing maps api? If not possible, what alternatives can I try?

From Bing maps API documentation :

You can request up to three (3) driving or transit route options between two waypoints by using the maxSolutions parameter:

http://dev.virtualearth.net/REST/v1/Routes/{travelMode}?wayPoint.1={wayPoint1}&viaWaypoint.2={viaWaypoint2}&waypoint.3={waypoint3}&wayPoint.n={waypointN}&heading={heading}&optimize={optimize}&avoid={avoid}&distanceBeforeFirstTurn={distanceBeforeFirstTurn}&routeAttributes={routeAttributes}&timeType={timeType}&dateTime={dateTime}&maxSolutions={maxSolutions}&tolerances={tolerances}&distanceUnit={distanceUnit}&key={BingMapsKey}

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