Google Map is not Showing Properly.

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

Google Map is not Showing Properly.

Postby vivek_goel » Fri Jul 30, 2010 9:55 am

Hi Plus Minus.

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

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hello.map"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application android:icon="@drawable/mapsicon" android:label="@string/app_name">
<uses-library android:name="com.google.android.maps" android:required="true"></uses-library>

<activity android:name=".map"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>

</manifest>

this is Main.xml


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<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="0VLe45SDuqjxrUhIc1-HWVybCFmiqzeKiz9kk0g"
/>

<LinearLayout android:id="@+id/zoom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
/>

</RelativeLayout>

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.
vivek_goel
Freshman
Freshman
 
Posts: 3
Joined: Wed Jul 14, 2010 10:52 am

Top

Re: Google Map is not Showing Properly.

Postby blundell » Wed Aug 04, 2010 8:55 am

Did you get your API key from your signed key, or from the eclipse debug key? < this will be your issue
Are you testing on an emulator or a real device?
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Re: Google Map is not Showing Properly.

Postby pranav09 » Mon Aug 09, 2010 7:13 am

Which API ver. you are use? I tried to put android:required="true" in my Manifest file, it didn't allow to me add it(I have used API level 1.6 to add this line). So, remove it and try again and let me know.

Thanks.
Pranav
User avatar
pranav09
Senior Developer
Senior Developer
 
Posts: 128
Joined: Mon Jan 19, 2009 12:01 pm
Location: Ahmedabad, India

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 5 guests