我有一个经度/纬度值。...如何搜索和获取城市?

最佳答案

使用google maps api,这是一个以XML格式获取地址的示例。

http://maps.google.com/maps/api/geocode/xml?latlng={latlng}&sensor={sensor}&region={region}

其中latlng = 0,0 sensor = false,而region =国家/地区代码,因此对于我的旧地址,它将是
http://maps.google.com/maps/api/geocode/xml?latlng=-43.893792,171.7592620&sensor=false&region=nz

然后,您可以使用该XML来获取所需的任何详细信息,包括城市

10-07 19:15
查看更多