Google 的地理编码网络服务有多可靠
我的网站正在使用 Google 的地理代码 Web 服务来获取地址的纬度和经度,并根据返回的坐标计算该坐标与另一个坐标之间的距离。
因为我觉得即使用户输入了错误的地址,谷歌也可能仅根据城市返回坐标。我根据两点之间的距离计算价格,范围为 0-50 公里。
谁能告诉我这有多有效,因为我认为它可能会返回不正确的距离。
还有其他方法可以做到这一点吗?
My site is using Google's Geo-code Webservice to get latitude and longitude of a address and based on returned coordinates, it is calculating distance between this and another coordinates.
As I feel that Google may return coordinates based on only city even though user enters in-correct address. I am calculating prices based on distance between both points and these are in 0-50 KM.
Can anybody tell me how effective is this as I think it may return incorrect distances.
Is there any other way to do this ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,如果用户输入了错误的地址,它会返回一个更通用的坐标。但是,来自服务的响应还包含一个标志,指示匹配仅是部分的。
检查结果
http://code 下的
partial_match
。 google.com/apis/maps/documentation/geocoding/#ResultsYes, if the user enters an incorrect address, it will return a more general coordinate. However, the response from the service also contains a flag indicating that the match was only partial.
Check for
partial_match
under Resultshttp://code.google.com/apis/maps/documentation/geocoding/#Results