得到google方向api没有回复

时间:2013-03-26 10:37:49

标签: google-maps-api-3 google-direction

我正在使用谷歌方向api获取两个地方之间的方向/路线。

当我查询

  

http://maps.googleapis.com/maps/api/directions/json?origin=New%20York%20LaGuardia%20Airport%20Marriott,%20Queens,%20NY,%20United%20States&destination=200%20e%2057th%20st%20ny&sensor=false

我获得状态= NOT_FOUND。

但是当我使用https://maps.google.com/纽约拉瓜迪亚机场万豪酒店,美国纽约州皇后区 200 e 57th styy 搜索此路径时。谷歌显示这两个地方之间的方向路径。您可以通过链接查看:link

如何从谷歌api获得响应。

感谢。

1 个答案:

答案 0 :(得分:1)

Google地图使用许多位置数据来源,包括地方结果。在我看来,方向服务找不到“纽约拉瓜迪亚机场万豪酒店,美国纽约州皇后区”(因为它不是地址)。如果我使用Places API,则可以找到它。

example using the javascript APIs