In order to use google Map Service,
Please visit code.google.com
and get you ApiKey.
create a project there->go to services->Activate the Google Maps Android API v2.
Then Create Key for your application.
Add the following permissions to your manifest.
<uses-permission android:name="com.anchit.locationapi.maps.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
use
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="your_apikey" />
also add
<permission
android:name="com.anchit.locationapi.maps.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
inside your Application Tag in manifest.
Use
map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))
.getMap();
in your code.
and set the other required properties. Now Run the Application.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…