Google API:使用公民号码和地址查找完整地址邮政编码
在加拿大的许多政府网站上,他们都有一个功能,即只能通过邮政编码和街道名称才能知道您的地址。
当您在谷歌地图上搜索邮政编码时,该邮政编码所覆盖的区域都会被覆盖。
但是查看谷歌地图API,我找不到仅根据邮政编码和公民编号来获取完整地址的方法。
On many government sites in Canada, they have a feature where they can know your address only by the postal code and the street name.
When you search a postal code on google map, the area covered by this postal code is covered.
But looking at the google map API, I can't find a way to get a complete address based only on the postal code and the civic number.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
恐怕 Google Geocoding API 中没有这样的功能。
如果您在加拿大或英国搜索(全精度)邮政编码,您可以通过结果中 Bounds 字段的小尺寸来判断结果非常精确,精确到一座建筑物(也许是几座)。示例(红框为边界):
M6G 1C5(加拿大)
http://gmaps-samples-v3.googlecode.com/svn/trunk/geocoder/v3-geocoder-tool.html#q%3DM6G%201C5
SW1V 4EB(英国)
http://gmaps-samples-v3.googlecode.com/svn/trunk/geocoder/v3-geocoder-tool.html#q%3DSW1V%204EB
您返回的结果是邮政编码,API 不会将其“翻译”为街道地址(例如 750 College St, Toronto, ON M6G 1C5)。如果您认为这在整个国家或其他国家(例如英国,不确定其他国家)效果很好,那么请考虑提交地理编码 API 的功能请求(并在此处发布问题编号:)
http://code.google.com/p/gmaps-api-issues/issues/entry?template=Geocoding%20API%20-%20Feature%20Request
HTH
I'm afraid there is no such feature in the Google Geocoding API.
If you search for a (full precision) postal code in Canada or UK, you can tell the result is pretty precise down to one building (maybe a few) by the small size of the Bounds field in the result. Examples (red box is Bounds):
M6G 1C5 (Canada)
http://gmaps-samples-v3.googlecode.com/svn/trunk/geocoder/v3-geocoder-tool.html#q%3DM6G%201C5
SW1V 4EB (UK)
http://gmaps-samples-v3.googlecode.com/svn/trunk/geocoder/v3-geocoder-tool.html#q%3DSW1V%204EB
The result you get back is the postal code, the API won't "translate" it into a street address (e.g. 750 College St, Toronto, ON M6G 1C5). If you think this would work great in the whole country and possibly others (e.g. UK, not sure of others) then please consider filing a Feature Request for the Geocoding API (and posting the issue number here :)
http://code.google.com/p/gmaps-api-issues/issues/entry?template=Geocoding%20API%20-%20Feature%20Request
HTH