Thursday, April 14, 2011

Android Google Map Example

Android Google Map Example DOWNLOAD SOURCE CODE
       1.To integrate with Google maps application you need to apply for a free Google Map API Key.
       2.To get the Google Map API Key you need to sign up for the Android Maps API.
       3.To sign up, you will need to provide the certificate's fingerprint (MD5).
       4.If you have a certificate fingerprint (MD5) you can sign up here
     and get the API Key.


To get certificate fingerprint (MD5) follow the simple steps below:
  • You need to get the keystore file for getting the certificate fingerprint (MD5).
  • Your keystore file can be found at the following path
"C:\Documents and Settings\<username>\Local Settings\Application Data\Android"
(Or)
"C:\Documents and Settings\<username>\.android"



 SOURCE CODE
main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView
android:id="@+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="056mRQ2iioMKqXlXQ9O4PdhQgQhpb4QZ89_jQsw"/>
</RelativeLayout>


you have to add apikey in main.xml




and in android manifest file you have to add this line inside application tag

  <uses-library android:name="com.google.android.maps" />  




Check out this may be help you

Related Posts Plugin for WordPress, Blogger...