i’m developing an android application similar to Google places app.
I want a functionality to obtain the location of a place on google maps in my application. How do i achieve this?
This is the use case:
-
Using GPS my current location’s lat and long will be passed using the notification service.
-
Then when i click on the button restaurant,the list of restaurants in that particular location will be displayed(all information is being retrieved from the server that i created using grails).
-
Then i select a restaurant’s name from the list being displayed.and then in the user interface there is a button called “MAP” .
-
Upon click of the “MAP” button, the location of the restaurant i have chosen must be displayed on Google maps.
What’s the thing that you can’t do – displaying the restaurant on the map, or having just the name of the place, you wish to find it’s address/coordinates on the map?
You can follow the official Android tutorial on the subject – Point 2 in this article: http://developer.android.com/resources/tutorials/views/… Probably this article will be useful as well: http://mobiforge.com/developing/story/using-google-maps-android
Part 1 and 2 guide you through the creation of a Map activity (you should start a new map activity when the user taps on MAP button) and how to add an overlay to the map. In the article the overlay is the android robot. The other articles uses a pushpin as an overlay. Overlay, on the other hand, is .. a picture that is displayed on the map. In your case – some pinpoint put on the coordinates of the restaurant. Once you’ve created the map activity, you can follow my second link and look for title “Adding Markers”. It’s very well explained.