-1

位置 ID 节点存在于位置 Google Location API V2 中,使用以下 URL: https ://maps.googleapis.com/maps/api/place/autocomplete/xml?input=london,%20Canada&types=geocode&sensor=true&key=my_key

最终返回结果,其中一部分如下所示:

<prediction>
<description>London, ON, Canada</description>
<type>locality</type>
<type>political</type>
<type>geocode</type>
<reference>
CjQqAAAAbN8JV6qwIOKVmGuRGXNc53ihbUG9GlHkRhwUh8ABdUgGC1IbdTRGVIdq5GtkATC_EhAKYnqcPv4ouW5QG5mG1AlOGhSa9oE0Cts801iMReUGyqG7mWZlfw
</reference>
<id>fab6815aadba41e81aa7bd51a445c4924317ec88</id>

但是当我使用以下网址使用较新版本的谷歌位置 Api v3 时: http ://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=london+canada

它不包括<id>,请帮助需要

4

1 回答 1

0

您问题中的第一个链接请求placesWebService,但第二个链接请求geocodingWebService

您仍然可以使用第一个链接,V3是 Maps- Javascript -API的当前版本,但您不使用 Javascript-API,您请求网络服务(对 Maps-Javascript-API 的更改没有任何对 Web 服务的影响)。

于 2013-02-05T11:19:14.463 回答