开发者

Geocoding java android multiple results

开发者 https://www.devze.com 2023-02-22 12:20 出处:网络
I am using the geocoder class to find functional locations on google maps. For instance: List<Address> addresses = geoCoder.getFromLocationName(\"winkel\", 20);

I am using the geocoder class to find functional locations on google maps. For instance:

List<Address> addresses = geoCoder.getFromLocationName("winkel", 20);

winkel is dutch for shop.

If I do this, he only returns 10 addresses. This does not satisfy my needs. I do want to be able to h开发者_如何学Pythonave them all (so 20)...

I've already surfed a little bit, and maybe I should use the google maps api together with php (or something similar), but I would prefer it to use the dedicated java class for android. Who has a suggestion?

Thank in advance.


Android recomends the maxResults should be from 1 to 5 [check this out][1]

[1]: http://developer.android.com/reference/android/location/Geocoder.html#getFromLocation%28double,%20double,%20int%29 so you may have to reconsider your requirement of fetching 20 results, this not only makes your app very slow but also eats up a lot of your phone's battery

0

精彩评论

暂无评论...
验证码 换一张
取 消