简体   繁体   中英

BING REST API doesn't work

http://dev.virtualearth.net/REST/V1/Routes/Driving?wp.0=39.8620280&wp.1=32.8374178&key=API_KEY

I've entered this url in the browser but got an error like this:

{"authenticationResultCode":"ValidCredentials","brandLogoUri":"http:\/\/dev.virtualearth.net\/Branding\/logo_powered_by.png","copyright":"Copyright © 2015 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.","errorDetails":["One or more locations specified in the waypoint parameter are invalid or require more information.","39.8620280","32.8374178"],"resourceSets":[],"statusCode":404,"statusDescription":"Not Found","traceId":"5cfe0d5b2852496b8163d3aad91ff48b|DB40060843|1.0.0.0|DB4SCH010060562, DB4SCH010061332, DB4SCH010080419, i-3f429881.us-east-1b, DB4SCH010061320, DB4SCH010061331, DB4SCH010080218, i-2276fe9c.us-east-1b"}

How to solve this?

Your waypoints are incorrect. You only provided a single coordinate for each point. Correct way would be to give both latitude and longitude, separated by coma, like this:

http://dev.virtualearth.net/REST/V1/Routes/Driving?wp.0=39.8620280,39.8620280&wp.1=32.837417,39.86202808&key=API_KEY

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