how to view the map in an android app
in my app i want to show the location address, latitude and longitude and exact position of the user in the map.
i am able to find the latitude and longitude. In my app i have a button named "View Map", whe开发者_JAVA技巧n the user click on it i want to show the location in a map. Is it possible to open the google maps or maps which is in present in the android devices when i click on the button, if not what is the option please help me...
You can either show a map inside your own activity as written in the previous answer's link or you can fire an intent to open the Google Maps application in your device. You can find the relevant intent here: http://developer.android.com/guide/appendix/g-app-intents.html
To start with showing Map in your Activity begin with http://developer.android.com/guide/tutorials/views/hello-mapview.html
And to show your location in attractive manner use https://github.com/jgilfelt/android-mapviewballoons
精彩评论