Friday, May 3, 2013

[android help] Blank Map Screen Open while using Google Maps Api v2


I am trying to use Google Maps Api V2 and following all the steps in Android Google Maps Article


But after all steps, code is executed on my glaxy young with android 2.36 but blank map screen is displayed


My main activity code is



protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.showmapactivity_layout);
FragmentManager myFragmentManager = getSupportFragmentManager();
SupportMapFragment mySupportMapFragment
= (SupportMapFragment)myFragmentManager.findFragmentById(R.id.map);
map = mySupportMapFragment.getMap();

//map = getFragmentManager().findFragmentById(R.id.map)).getMap();
Marker hamburg = map.addMarker(new MarkerOptions().position(HAMBURG)
.title("Hamburg"));
Marker kiel = map.addMarker(new MarkerOptions()
.position(KIEL)
.title("Kiel")
.snippet("Kiel is cool")
.icon(BitmapDescriptorFactory
.fromResource(R.drawable.ic_launcher)));

// Move the camera instantly to hamburg with a zoom of 15.
map.moveCamera(CameraUpdateFactory.newLatLngZoom(HAMBURG, 15));

// Zoom in, animating the camera.
map.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null);
}


Maifestfile code is




package="com.archifiles.pointpakistan"
android:versionCode="1"
android:versionName="1.0" >

android:minSdkVersion="10"
android:targetSdkVersion="10" />

android:name="com.archifiles.pointpakistan.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />

android:glEsVersion="0x00020000"
android:required="true" />








android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:name="com.archifiles.pointpakistan.SplashScreenActivity"
android:label="@string/app_name" >










android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyDe_pk7x98rwq2GTkaaUUv0K0Yri3TRPUA" />

android:name="com.google.android.maps"
android:required="true" />




Layout file code



xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >

android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment" />




No log traces are available in log cat, Please help urgently



.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...