使用谷歌地图API地址验证 [英] Address validation using Google Maps API

查看:170
本文介绍了使用谷歌地图API地址验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个任务,以验证进入我目前正在创建一个系统的地址。该系统要求输入的地址是针对一个有效的数据源验证。在英国数据集来自皇家邮政和是昂贵的访问。

I have a task to validate addresses entered into a system I am currently creating. The system requires that address entered are validated against a valid data source. In the UK the dataset comes from the Royal Mail and is expensive to access.

所需的数据是整个欧洲的开始与由API到Web应用程序访问后code的信息。

The data needed is post code info for the whole of europe to start with accessed by an API into the web application.

有许多公司提供这种服务,

There are a number of companies that offer this service,


  1. QAS

  2. Capscan

  3. 张贴code随时随地

这些都提供了我所需要的服务。然而,这是昂贵的,在某些情况下,不是一个完整的数据集。例如不爱尔兰

These all offer the service I require. However this is expensive and in some cases not a complete data set. e.g. not Ireland

我也想知道是否有将利用谷歌地图API通过邮政code和国家来验证这个数据的方法。

I was also wondering if there would be a way to utilize the Google Maps API to validate this data via postal code and country.

请问谷歌地图的方法可能还是我下去这些昂贵的公司之一线?任何想法是什么线我应该采取。

Would the google maps method be possible or do I have to go down the line of one of these expensive companies? Any thoughts on what line I should take.

推荐答案

答案可能取决于它是多么的重要,为您获得这项服务的支持和可能的定制。

The answer probably depends how critical it is for you to receive support and possible customization for this service.

谷歌当然可以做到这一点。看看他们的XML和地理编码的API。您应该能够工艺的XML消息,询问谷歌返回地图坐标为给定的地址。如果地址没有找到(无效),您将收到相应的响应。下面是一个有用的页面:<一href=\"http://$c$c.google.com/apis/maps/documentation/services.html#XML_Requests\">http://$c$c.google.com/apis/maps/documentation/services.html#XML_Requests

Google can certainly do this. Look into their XML and Geocoding API's. You should be able to craft an XML message asking Google to return Map coordinates for a given address. If the address is not found (invalid), you will receive an appropriate response. Here's a useful page: http://code.google.com/apis/maps/documentation/services.html#XML_Requests

请注意,谷歌提供的地图API的目的是实际的地图绘制地址。虽然你当然可以用于其他目的的数据,你在谷歌的怜悯应他们的地图之一,并不完全符合您的法律或商业地址验证的需要。如果你付出你提到的服务之一,你将可能是能够得到支持,应某些地址不能解决你希望他们的方式。

Note that Google's aim in providing the Maps API is to plot addresses on actual maps. While you can certainly use the data for other purposes, you are at the mercy of Google should one of their maps not exactly correspond to your legal or commercial address validation needs. If you paid for one of the services you mentioned, you would likely be able to receive support should certain addresses not resolve the way you expect them to.

在换句话说,你得到你所支付;)。如果你有时间,不过,为什么不尝试实施基于谷歌的解决方案,然后从那里?该API看起来pretty光滑,而且它是免费的,毕竟。

In other words, you get what you pay for ;) . If you have the time, though, why not try implementing a Google-based solution then going from there? The API looks pretty slick, and it's free, after all.

这篇关于使用谷歌地图API地址验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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