0

I am new in android programming, I had problem in showing Map with getting the location that is touched, could any one help. Here please me code bellow. Thank you in advance. Note: I took the code from this site, I used displaying the Map and it was working but when I am trying to use the last code in the site for display the touch location, does not work.

juankysmith
  • 11,839
  • 5
  • 37
  • 62
Suleyman
  • 1
  • 1

4 Answers4

2

After seeing the link you have given for code reference .i have seen that you are developing with the old outdated API V1 for android which will not work now because the new Maps API V2 for android is now applicable.

The API is now distributed as part of the Google Play services SDK, which you can download with the Android SDK Manager. Maps are now encapsulated in the MapFragment class, an extension of Android's Fragment class. Now you can add a map as a piece of a larger Activity. With a MapFragment object, you can show a map by itself on smaller screens,
such as mobile phones, or as a part of a more complex UI on
larger-screen devices, such as tablets.

Because maps are encapsulated in the MapFragment class, you can implement them by extending the Android standard Activity class,
rather than extending the MapActivity used in version 1. The Maps API now uses vector tiles. Their data representation is smaller, so maps appear in your apps faster, and use less bandwidth.

Caching is improved, so users will typically see a map without empty areas. Maps are now 3D. By moving the user's viewpoint, you can show the map with perspective.

See my blog posts i have tried to summarize all there is needed to build an App with Google Maps API V2 for Android.

  1. Solution to Problems with Maps API V2(using google_play_services_lib).
  2. Creating an Android App with Maps API V2 for minSDK=8 (Android 2.2 Froyo).
  3. Creating an Android App with Maps API V2 for minSDK=11 (Android 3.0 HoneyComb).
General Grievance
  • 4,555
  • 31
  • 31
  • 45
Neo
  • 1,359
  • 14
  • 34
1

I've played with the Google Maps Android Library V2 a bit.
Here is an example I did that works, see if it can help you. I stripped out my own API key, but i've included many different parts including the need to setup:

http://www.digitalopium.com/android-google-maps-api-tutorial/

-Debug/Retail Certificates and the SHA-1 key -Google Project and the Android Map API key -Google Play services via the Android SDK -Project setup including the manifest file and code snippets.

Maurice Yu
  • 71
  • 4
0

Google has changed the method of obtainig map keys, previously it was using MD5 fingerprint Now you can follow the link to integrate the map

Integrating google maps in android applicaiton

Anas Shahid
  • 353
  • 2
  • 5
  • 10
0

This tutorial has a section about getting location from touched position. Hope it will help you. Google Maps Android v2 Tutorial

thuongnh.uit
  • 161
  • 6