We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
两年后,我认为 Google Maps Geocoding API 是最好的选择。
只需传入邮政编码作为地址参数即可:
Two years later, IMO the Google Maps Geocoding API is the best way to go.
Just pass in the postal code as the address parameter:
您需要一个可以进行地理编码的服务。
Yahoo 的 Geocoder API 在全球范围内取得了更好的结果。
110021
是新德里以及印度其他几个地方的邮政编码世界。这似乎把它们全部拿到。
Google Maps API 是另一个此类服务,但我'我对地理编码结果不满意,因为我没有得到
110021
的所有结果。You need a service that does geocoding.
Yahoo's Geocoder API is getting much better results globally.
110021
is the postal code for New Delhi among several other places in the world.This seems to get them all.
Google Maps API is another such service but I'm not happy with the geocoded results as I don't get all results back for
110021
.RedLine 提供免费的邮政编码 API 服务(每小时最多 250 个请求)。有 4 种不同的变体,涵盖两个邮政编码之间的距离、邮政编码半径内的邮政编码、城市、州和邮政编码的纬度/经度以及城市的邮政编码。 http://zipcodedistanceapi.redline13.com/
RedLine offers a free zipcode API service (up to 250 requests per hour). There are 4 different varieties covering distances between two zipcodes, zipcodes within a radius of a zipcode, City, state and Lat/long of a zipcode and the zipcode of a city. http://zipcodedistanceapi.redline13.com/
只需放入我的.02,使用上面提到的Google Maps API,就可以查找全球信息。我目前正在开发一个项目,并且几乎将其作为我解决此问题的解决方案来实施。好吧,把我的小肥皂盒拿掉。
Just to put in my .02, using the Google Maps API mentioned above, you can look up global information. I am currently working on a project and am pretty much implementing it as my solution for this issue. Ok, off my tiny soap box.
美国邮局出售订阅服务,将 5 位邮政编码映射到城市/州值。正如@Timothy 所说,映射是一对多的。但是,邮局数据库确实标记了哪个城市/州是给定邮政编码的“主要”城市/州。
不知道其他国家怎么样。请咨询您所在国家/地区的邮政当局。
请参阅USPS 页面的地址 API 部分
The US Post Office sells a subscription to map 5 digit zip codes to City/State values. As @Timothy says, the mapping is one to many. However, the post office db does mark which city/state is the "primary" for a given zip code.
Don't know about other countries. Check with your country's postal authority.
See the Address APIs section of the USPS page