Blank Screen on map application

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Blank Screen on map application

Postby vpachawa » Tue Sep 28, 2010 8:49 pm

Hi
I am developing a basic gps application to show the map.
But all I get is blank screen on emulator.

I am behind a proxy but internet application is working fine on emulators.
I tried generating a google maps api key and am using that.

mu manifest.xml would be:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.prag" android:versionCode="1" android:versionName="1.0">
  3.  
  4. <application android:icon="@drawable/icon" android:label="@string/app_name">
  5. <activity android:name=".LatitLongit" android:label="@string/app_name">
  6.  
  7. <intent-filter>
  8. <action android:name="android.intent.action.MAIN" />
  9. <category android:name="android.intent.category.LAUNCHER" />
  10. </intent-filter>
  11.  
  12. </activity>
  13.  
  14. <activity android:name=".maps.MapViewExample"></activity>
  15. </application>
  16.  
  17. <uses-library android:name="com.google.android.maps" />
  18. <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  19. <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  20. <uses-permission android:name="android.permission.INTERNET" />
  21.  
  22. </manifest>
Parsed in 0.004 seconds, using GeSHi 1.0.8.4


and my mapview xml would be:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.  android:orientation="vertical"
  4.  android:layout_width="fill_parent"
  5.  android:layout_height="fill_parent"
  6.  >
  7.   <com.google.android.maps.MapView
  8.    android:id="@+id/mapView"
  9.    android:layout_width="fill_parent"
  10.    android:layout_height="fill_parent"
  11.    android:enabled="true"
  12.    android:clickable="true"
  13.    android:apiKey="0xIRsMjQ0PEIuyzI4WWrcPjYhE8e5EdyAtgcRQg"
  14.    />
  15. </LinearLayout>
  16.  
Parsed in 0.002 seconds, using GeSHi 1.0.8.4


my mapview java class has the following code:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public class MapViewExample extends MapActivity {
  2.  
  3.         /** Called when the activity is first created. */
  4.         @Override
  5.         public void onCreate(Bundle savedInstanceState) {
  6.                 setTitle("Map View");
  7.                 super.onCreate(savedInstanceState);
  8.                 setContentView(R.layout.mapviewexample);
  9.         }
  10.  
  11.         @Override
  12.         protected boolean isRouteDisplayed() {
  13.                 return true;
  14.         }
  15.  
  16. }
  17.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


Can you help me out in figuring out the problem and get to a solution for it?

Thank you.

Appreciate your time.
Regards,
Venkata Pachawa
vpachawa
Developer
Developer
 
Posts: 47
Joined: Tue Jun 08, 2010 8:54 pm
Location: St Catharines, Ontario, Canada

Top

Re: Blank Screen on map application

Postby barryvdh » Wed Sep 29, 2010 8:43 am

Are you sure you have a working API key, for your Debug key?
http://mobiforge.com/developing/story/u ... ps-android
barryvdh
Freshman
Freshman
 
Posts: 4
Joined: Mon Sep 13, 2010 7:41 am

Re: Blank Screen on map application

Postby vpachawa » Wed Sep 29, 2010 3:28 pm

Hi Barry,

Thank You. I have generated the api key twice and it gave me the same api key.
but still am not able to get the maps working on the emulator
Regards,
Venkata Pachawa
vpachawa
Developer
Developer
 
Posts: 47
Joined: Tue Jun 08, 2010 8:54 pm
Location: St Catharines, Ontario, Canada

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 4 guests