Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Discussion > Android Applications

Android Applications All the information you could ever want about Android Applications. Learn about apps and get help with them... all here! New apps can be found and announced in the Applications Announcements forum linked below.



Reply
 
LinkBack Thread Tools
Old July 1st, 2011, 06:34 AM   #1 (permalink)
New Member
 
Join Date: Jul 2011
Posts: 1
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default Google MapView Help

Hi,

Ive read all the other help on this forum about the MapView but I still can't get it to display the tiles.

Ive checked multiple times:
that I have added the INTERNET permission
That my APIKey is correct
That the maps library is added inside the application tags

Here is my code:

Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.android.UniGPS"
      android:versionCode="1"
      android:versionName="1.0">
      
    <application android:icon="@drawable/icon" android:label="@string/app_name">
    	<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
   		<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    	<uses-permission android:name="android.permission.INTERNET" />
    	
        <activity android:name=".UniGPS"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <uses-library android:name="com.google.android.maps" />
    </application>
    
</manifest>
Code:
package com.android.UniGPS;

import android.os.Bundle;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;

public class UniGPS extends MapActivity {
	
	MapView mapView;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.main);
	    
	    mapView = (MapView) findViewById(R.id.mapview);
	    mapView.setBuiltInZoomControls(true);
	}

	@Override
	protected boolean isRouteDisplayed() {
		return false;
	}
	
}
Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mainlayout"
    android:orientation="vertical"
    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="wrap_content"
                 android:apiKey="0Dj81s0S26kxIuiqRRH5hLbqcTuTODBclAzkMqw"
                 android:clickable="true"
                 />

</RelativeLayout>

GeorgeFrost is offline  
Reply With Quote
Sponsors
Old July 1st, 2011, 07:38 AM   #2 (permalink)
Senior Member
 
Join Date: Dec 2009
Posts: 3,355
 
Device(s): Motorola Droid
Thanks: 0
Thanked 284 Times in 241 Posts
Default

You'll have better luck with dev questions in a dev forum.
takeshi is offline  
Reply With Quote
Reply

Bookmarks


Go Back   Android Forums > Android Discussion > Android Applications User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 01:16 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo