hiii all,
i am using following codes 2 display google map but stiil it is not coming.
.JAVA FILE
package com.googlemaps;
import com.google.android.maps.*;
import com.google.android.*;
import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
public class mapdisplayActivity extends MapActivity {
/** Called when the activity is first created. */
// LinearLayout linearlayout ;
MapView map;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MapView mMapView = new MapView(this,
"0iPfyUCdrBSuIGmumwpfwvQFOy-In7XLB9c3G7Q");
setContentView(mMapView);
setContentView(R.layout.main);
map=(MapView)findViewById(R.id.mapview);
}
@Override
protected boolean isRouteDisplayed() {
return false;
}
MAIN.XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="0iPfyUCdrBSuIGmumwpfwvQFOy-In7XLB9c3G7Q"
/>
</LinearLayout>
MANIFEST.XML
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.googlemaps"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="11" />
<uses-permission
android:name="android.permission.INTERNET"></uses-permission>
<application android:icon="@drawable/icon"
android:label="@string/app_name">
<uses-library android:name="com.google.android.maps"/>
<activity android:name=".mapdisplayActivity"
android:label="@string/app_name">
<activity android:name=".mapdisplay"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</activity>
</application>
</manifest>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en