BING REST API不起作用

时间:2015-11-26 10:06:04

标签: rest bing-api

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

我在浏览器中输入了这个网址,但是出现了这样的错误:

{"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"}

如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

您的航点不正确。您只为每个点提供了一个坐标。正确的方法是给出由昏迷分隔的纬度和经度,如:

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