从位置邮编code [英] ZipCode from location

查看:114
本文介绍了从位置邮编code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么办法让从位置或经纬度或长当前用户位置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

这篇关于从位置邮编code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆