I'm working on an Android application where I'm performing a search on all businesses in a radius around a city, and I'm looking for a way to get the addresses of the businesses at each pin into my application so I can work with them. I can perform the search and display it on a map using MapViews, but I can't figure out a way to get access to the list of results. When I use an HTTP GET approach with a output=csv or xml, it only r开发者_JAVA百科eturns the address / GeoPoint of the city I centered the search around.
Does anyone know of a set of methods or a different approach that I can use to get the addresses of the returned businesses from my query in an Android application? Thanks.
This is not via the Maps api, as I don't know that, but there is a Geocoder class in Android SDK that you can use to get addresses from geopoints an viceversa
Geocoder
A class for handling geocoding and reverse geocoding. Geocoding is the process of transforming a street address or other description of a location into a (latitude, longitude) coordinate. Reverse geocoding is the process of transforming a (latitude, longitude) coordinate into a (partial) address. The amount of detail in a reverse geocoded location description may vary, for example one might contain the full street address of the closest building, while another might contain only a city name and postal code. The Geocoder class requires a backend service that is not included in the core android framework. The Geocoder query methods will return an empty list if there no backend service in the platform.
精彩评论