Map does not appear

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

Map does not appear

Postby mavmak » Fri Mar 18, 2011 7:53 am

My code is

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. package com.icsdhelp;
  2.  
  3. import com.google.android.maps.MapActivity;
  4. import com.google.android.maps.MapController;
  5. import com.google.android.maps.MapView;
  6. import com.google.android.maps.GeoPoint;
  7.  
  8. import android.os.Bundle;
  9.  
  10.  
  11. public class MyMapActivity extends MapActivity {
  12.        
  13.        
  14.         private MapView mapView;
  15.         private MapController mapController;
  16.         @Override
  17.         public void onCreate(Bundle savedInstanceState) {
  18.         super.onCreate(savedInstanceState);
  19.         setContentView(R.layout.map);
  20.         mapView = (MapView)findViewById(R.id.map_view);
  21.         }
  22.         @Override
  23.         protected boolean isRouteDisplayed() {
  24.         // IMPORTANT: This method must return true if your Activity
  25.         // is displaying driving directions. Otherwise return false.
  26.         return false;
  27.         }
  28. }
  29.  
Parsed in 0.035 seconds, using GeSHi 1.0.8.4


But the map does not appear. Only the following... What I am doing wrong? (sorry for my bad english)


Image

I have already add Internet permission and google maps library on manifest.
mavmak
Freshman
Freshman
 
Posts: 9
Joined: Wed Nov 03, 2010 6:22 pm

Top

Re: Map does not appear

Postby puxdroid » Sat Mar 19, 2011 11:41 am

You need to add the API key to your layout.xml. Go to this page http://code.google.com/android/maps-api-signup.html and get it by free.
puxdroid
Developer
Developer
 
Posts: 49
Joined: Wed Nov 25, 2009 11:57 am

Re: Map does not appear

Postby mavmak » Sat Mar 19, 2011 1:28 pm

i have already do that :(
mavmak
Freshman
Freshman
 
Posts: 9
Joined: Wed Nov 03, 2010 6:22 pm

Re: Map does not appear

Postby ashwani » Mon Mar 21, 2011 5:07 am

if you are working on emulator then make sure your network is up and running. try passing proxy setting from eclipse if you are working behind proxy.
ashwani
Freshman
Freshman
 
Posts: 8
Joined: Thu Mar 10, 2011 12:43 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: Exabot [Bot] and 3 guests