Geocoding API

将地址转换为地理坐标(地理编码),然后,您可以使用这些坐标在地图上放置标记或定位地图。您还可以使用此 API 将地理坐标转换为地址(反向地理编码)。

服务:geocoding-backend.googleapis.com

创建 RPC 客户端存根需要名为 geocoding-backend.googleapis.com 的服务。

google.maps.geocode.v4alpha.DestinationService

方法
SearchDestinations 此方法会执行目的地查找并返回目的地列表。

google.maps.geocode.v4alpha.GeocodeService

方法
GeocodeAddress 此方法会执行地址地理编码,将地址映射到 LatLng。
GeocodeLocation 此方法执行位置地理编码,即将 LatLng 映射到地址。
GeocodePlace 此方法使用地点 ID 执行地理编码查找。

google.maps.geocode.v4beta.DestinationService

方法
SearchDestinations 此方法会执行目的地查找并返回目的地列表。

google.maps.geocode.v4beta.GeocodeService

方法
GeocodeAddress 此方法会执行地址地理编码,将地址映射到 LatLng。
GeocodeLocation 此方法执行位置地理编码,即将 LatLng 映射到地址。
GeocodePlace 此方法使用地点 ID 执行地理编码查找。