Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 11 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
您可以尝试搜索 OpenStreetMap 的 Nominatim。您可以使用多个公共服务器,如果这对您来说还不够,您可以随时设置自己的服务器。
You can try Nominatim that searches OpenStreetMap. There are several public servers that you can use and if it isn't enough for you, you can always set up your own.
Google 的 API 禁止在不显示地图的情况下使用,也禁止自动请求。虽然 Mapquest/Nominatim API 很好,但我想添加一点注意事项。
如果您不关心准确性,那么向用户建议国际地址相当容易。然而,如果您只想建议正确的地址,则任务会变得更加复杂。每个国家/地区的邮政机构(例如美国邮政局、加拿大邮政等)以不同的方式处理其官方记录。许多国家处理得不好,提供查询记录方式的国家就更少了。
例如,我在 SmartyStreets(总部位于美国)工作,我们在那里进行 CASS 认证的美国邮政地址验证。在美国,这意味着我们返回的建议仅是正确的地址。 Google、Yahoo,甚至 MapQuest,执行地址近似,而不是地址验证。在某些情况下,您会得到无效的结果,但您永远不会知道。
仅供思考。如果您还有任何其他与地址相关的问题,请告诉我;至少对于美国地址,我们可以相当全面地为您提供帮助。
Google's API prohibits use without displaying a map and also no automated requests. While the Mapquest/Nominatim APIs are good, I want to add a note of caution.
International addresses are fairly easy to suggest to users -- if you don't care about accuracy. If you only want to suggest correct addresses, however, the task becomes much more complex. Each country's postal agency (e.g. the USPS, Canada Post, etc) handles their official records differently. Many countries don't handle them well, and even fewer provide ways for you to query their records.
For example, I work for SmartyStreets (US-based), where we do CASS-Certified US postal address verification. In the US, that means that suggestions we return are only correct addresses. Google, Yahoo, even MapQuest, perform address approximation, not address validation. In some cases, you will get results which are not valid, but you'd never know it.
Just food for thought. If you have any other address-related questions, just let me know; at least for US-based addresses, we can help you quite comprehensively.