有没有什么办法让从位置或经纬度或长当前用户位置zip- code。 如果是的话怎么样?
Is there any way to get zip-code of the current user location from location or lat or long. If so how?
是的,你可以...所有你需要做的是提取
Yes you can...All you need to do is extract the
http://maps.google.com/maps/geo?ll= 纬度,经度
http://maps.google.com/maps/geo?ll=10.345561,123.896932
或者尝试尝试这种solutions.I可以给你出个主意。
Or try experimenting this solutions.I can give you an idea.
您可以有一个城市吗?与此JSON数据,如果你的拉链code数据库(在maxmind.com)这种格式
You can have a city right? WIth this json data, If you have a database(at maxmind.com) of the zipcode with this format
国家code |城|邮编code PH |宿雾| 6000
CountryCode | City | ZipCode PH |Cebu |6000
现在查询数据库,是相对于该国code表示谷歌的回报。
Now query your database that is relative to the countrycode that googles return.
更新的
UPDATE
地理编码API V2已经推掉2013年9月9日。
下面的API服务的新网址
Here's the new URL of API service
的http://maps.googleapis.com/maps/api/geo$c$c/json?latlng=your_latitude,your_longitude
的http://maps.googleapis.com/maps/api/geo$c$c/json?latlng=10.32,123.90&sensor=true