Get surrounding location details using GPS?
I'm new to Android开发者_如何学编程; I'm able to get the current location using GPS but how do I get the surrounding location details using the current location obtained? Please guide me.
Use this :
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=business+near+city");
startActivity(intent);
After geo you put your coordinates, and after q= you input your search tearms, like tourism+city. This will fire up the Google Maps app with the points of interest.
If you want to use a maps view inside your application, you would need to get the data from some service, like your own. However you could pull the data from Google's ajax search like this
http://ajax.googleapis.com/ajax/services/search/local?v=1.0&rsz=large&gl=pl&q=tourism+chicago
more info : http://code.google.com/apis/websearch/docs/reference.html#_fonje_local
This will give you results that have geo-coordinates and you would need to make a way of parsing the results and maybe get them into a database.
hope it helps...
精彩评论