Android上的位置感知的地理编码(就像谷歌地图) [英] Location-aware geocoding on Android (just like Google Maps)

查看:144
本文介绍了Android上的位置感知的地理编码(就像谷歌地图)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看来,在谷歌地图应用的搜索位置感知。例如,如果我搜索Pitt街,而在悉尼,它找到合适的街道,立竿见影。单击你的意思是......带来了其他的Pitt街名单关闭的近郊

It seems that the search in the Google Maps app is location aware. For example, if I search for "Pitt St" while in Sydney, it finds the right street straight away. Clicking "Did you mean..." brings a list of other "Pitt St" close in nearby suburbs.

有没有办法在GE我们的应用程序类似的经历?我试过标准地理codeR ,但类似的搜索返回Pitt街,纽约的第一场比赛。

Is there a way to ge a similar experience in our apps? I tried the standard Geocoder, but a similar search returns "Pitt St, New York" as the first match.


  • 有没有我缺少一组选项?

  • 是否有不同的API,我们可以用这个?

  • 作为最后的手段,你认为这是合理的用1公里,10公里100公里一个最大半径查询地理codeR,然后按距离排序的结果手动实现这一点,例如?

干杯

罗曼

推荐答案

你使用哪种功能? 地理coder.getFromLocationName()需要一个边界框,使您可以将搜索结果限于某一个地区,所以你可以得到当前GPS位置首先并传递英寸

Which function did you use? Geocoder.getFromLocationName() takes a bounding box that allows you to limit the results to a certain region, so you could get the current GPS position first and pass that in.

另外,你可以去通过地理codeR API 这是更加灵活,而且在TOS的条款更严格,更何况很多使用更多的工作。 (我不知道,如果用它从Android应用程序都包括在TOS,我没有看过它了)。

Alternatively, you could go through the Geocoder API which is more flexible, but also more restrictive in terms of the TOS, not to mention a lot more work to use. (I'm not sure if using it from an Android app is covered in the TOS, I haven't looked at it much).

这篇关于Android上的位置感知的地理编码(就像谷歌地图)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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