tags:

views:

65

answers:

3

Hi all,

Greetings

I Have seen so many solutions u provide to developers. great work man.

i have some GOOGLE map display problem. i have developed an android application. which uses google map api. but now application is working but only showing blank map. i got map key also after providing MD5 certificate. i m really very fed up. not getting any sollution.

This is Manifest.xml

this is Main.xml

this is java file

package com.hello.map;

import android.app.Activity; import android.os.Bundle;

import com.google.android.maps.MapActivity; import com.google.android.maps.MapView; import android.os.Bundle; import android.os.Bundle; import android.view.View; import android.widget.LinearLayout; import android.widget.LinearLayout.LayoutParams;

public class map extends MapActivity { MapView mapView; /** Called when the activity is first created. */ @Override

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);

mapView = (MapView) findViewById(R.id.mapView); LinearLayout zoomLayout = (LinearLayout)findViewById(R.id.zoom); View zoomView = mapView.getZoomControls();

zoomLayout.addView(zoomView, new LinearLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); mapView.displayZoomControls(true); mapView.setSatellite(true);

}

@Override protected boolean isRouteDisplayed() { // TODO Auto-generated method stub return false; } }

PLease provide me the sollution. its a request.

A: 

You need to set the correct maps api key.

<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="************YOUR_KEY_HERE**********"
    />

see http://mobiforge.com/developing/story/using-google-maps-android

Mathias Lin
A: 

Make sure that you have the required permission in your Manifest:

  • android.permission.ACCESS_COARSE_LOCATION or android.permission.ACCESS_FINE_LOCATION
  • android.permission.INTERNET
ccheneson
A: 

Are you working behind a proxy? i suggest to use a direct internet connection if you are. And yeah don't forget the INTERNET_PERMISSION in your AndroidManifest.xml

Lebriga