Google Maps API:您能否明确限定地址部分
我们正在使用 Google Maps API 作为应用程序来确定数据库中一组地址的距离和行车路线。总体而言,我们正在处理大约 1000 个地址,其中一些地址存在拼写错误、缩写等,这导致返回正确的地址命中(纬度/经度)时出现一些问题。
对于未返回正确结果的地址,我们尝试删除部分地址(即仅使用地址和邮政编码,而不使用城市、州)。但我们发现有些结果相差甚远(即在波兰的某个地方)。
因此,我们想知道是否可以限定地址部分(即地址=1600 宾夕法尼亚大道&邮政编码=49455)以避免 Google 地图的误解。有人知道是否可以这样做吗?
We're using the Google Maps API for an application to determine distance and driving directions for a set of addresses in a database. Overall, we're dealing with around a 1000 addresses and some have typos, abbreviations,... that are causing some problems with returning the proper address hit (lat/long).
For addresses that don't return a proper result, we are trying to drop parts of the address (i.e. just use Address and Zip, and not City, State). But we're finding that some of the results are waaaaay off (i.e. somewhere in Poland).
So, we're wondering if it's possible to qualify the address parts (i.e. address=1600 Pennsylvania Avenue&zipcode=49455) to avoid misinterpretation by Google maps. Anyone know if it's possible to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为你只能将字符串发送到谷歌并处理你返回的内容。您可以做的一件事是使用 GClientGeocoder.setViewport() 指定应显示结果的边界框和/或使用 GClientGeocoder.setBaseCountryCode() 指定您的结果应位于特定国家/地区。
I think you're stuck with just sending the string to google and dealing with what you get back. One thing you can do is use GClientGeocoder.setViewport() to specify a bounding box where your results should show up and/or use GClientGeocoder.setBaseCountryCode() to specify that your results should be in a specific country.
http://en.wikipedia.org/wiki/Garbage_In,_Garbage_Out “GIGO”这是涉及地址的规则。
有很多邮件列表公司会付费清理您的地址列表,而不是尝试自己清理列表。
他们将更正地址并识别虚假地址。他们还将通过邮局的转发数据库运行您的列表。这将为您提供旧数据的当前地址。
人和企业不断流动。
额外 -
如果您有好的邮政编码,您可以使用它们来代替城市、州。只需使用“10 main st, 10045”作为 Google 的输入即可。但您需要知道您的邮政编码是正确的。 (邮件列表公司将为您处理。)
http://en.wikipedia.org/wiki/Garbage_In,_Garbage_Out "GIGO" is the rule when it comes to addresses.
Rather than trying to clean the list yourself, there are plenty of mailing list companies that will cleanup your address list for a fee.
They will correct addresses, and identify bogus addresses. They will also run your list through the post office's Forwarding database. That will give you the current addresses for your older data.
People and businesses move constantly.
Added--
If you have good zip codes, you can use them instead of the city, state. Just use "10 main st, 10045" as your input to Google. But you need to know that your zip codes are correct. (A mailing list company will handle that for you.)