从已知坐标如何确定它在Google地图上的区域?

时间:2018-01-17 12:30:01

标签: google-maps google-maps-api-3 coordinates latitude-longitude

例如,我有坐标(纬度和经度),我想知道这个坐标的位置是在Google地图上的道路,公园或建筑物上。 Google Maps是否有此类API可以返回此类数据?感谢。

1 个答案:

答案 0 :(得分:0)

你现在拥有的是Geocoder API [1],你可以用它做反向地理编码[2],换句话说你用纬度和经度做一个请求,你得到一个格式化的地址(或几个)作为回应,在响应中有一个“类型”字段,它为您提供有关地址类型的信息,支持的一些类型:[3]。

[1] https://developers.google.com/maps/documentation/geocoding/intro

[2] https://developers.google.com/maps/documentation/geocoding/intro#ReverseGeocoding

[3] https://developers.google.com/maps/documentation/geocoding/intro#Types

你可以用它来做更多建议你阅读文档。

还有Places API可以与Geocoder一起使用,支持更多类型:[4]。

[4] https://developers.google.com/places/supported_types