简体   繁体   English

Google API的地图方向摘要

[英]Google maps direction summary from API

Is it possible to get the following summary from the google direction service api: 是否有可能从Google Directions Service API获取以下摘要:

在此处输入图片说明

There is a summary property returned by the API but it doesn't matcch the summaries on google. API返回了一个summary属性,但它不会匹配Google上的摘要。 (see screen grab) (请参阅屏幕抓取)

在此处输入图片说明

Google Maps App != Google Maps APIs and Service Google Maps App!= Google Maps API和服务

Just to set the correct expectations, you shouldn't expect the Google Maps APIs and Web Services and the Google Maps App to work in the exact same way at all times. 只是为了设定正确的期望,您不应该期望Google Maps API和Web服务以及Google Maps App始终以完全相同的方式工作。

The Google Maps App gathers data from many different sources, such as Wikis, local business listings or Google+ information. Google Maps App从许多不同的来源收集数据,例如Wiki,本地企业列表或Google+信息。 The Directions API on the other hand uses a mix of information from the Geocoding API with other APIs to determine the best path to a given location. 另一方面,Directions API结合使用了Geocoding API和其他API的信息,以确定到达给定位置的最佳路径。

What now? 现在怎么办?

In short, you can't expect these two different things to return the same, and the Directions API is not equipped to return all the data you are looking for. 简而言之,您不能指望这两个不同的事物返回相同的结果,并且Directions API无法配备返回所要查找的所有数据的功能。

You can however try the following: 但是,您可以尝试以下操作:

  • Make multiple requests (as you pointed) and use the optional alternatives parameter; alternatives多个请求(如您所指出的)并使用可选的alternatives参数;
  • Mix you data with data from third parties, like Google does. 像Google一样,将您的数据与来自第三方的数据混合。

Hope it helps ! 希望能帮助到你 !

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM