[Google Maps] Problème d'affichage de carte
Bonjour,
Je n'arrive pas à afficher la carte sur mon projet android.
A la place, j'ai une matrice de carrés.
J'ai écrit mon code à partir de tutos trouvés sur internet ou les livres. Je ne pense pas qu'il y ait de problème de ce côté là.
Je pense que cela vient de la clé fournie par google.... Je n'arrive pas à trouver qq chose sur internet.
Voici mon code
Manifeste :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="Pack.MonAppliGoogleMap"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name">
<uses-library android:name="com.google.android.maps" />
<activity
android:name=".ProjetGoogleMapActivity"
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> |
code java :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| package Pack.MonAppliGoogleMap;
import com.google.android.maps.MapActivity;
import android.app.Activity;
import android.os.Bundle;
public class ProjetGoogleMapActivity extends MapActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
@Override
protected boolean isRouteDisplayed()
{
return false;
}
} |
code xml
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<com.google.android.maps.MapView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="0HdAgL6BaDUWf-Fzd0_xR-tpjfFaRbp05wLuppg"
/>
</LinearLayout> |
Je fais un run as application android ou debug as application android, même résultat.
Ce que je vois qur mon écran :
05-15 06:29:01.528: W/System.err(642): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
mais aussi :
IOException processing : 26
java.io.IOException : Server return : 3
Un grand merci pour m'aider à résoudre mon pb.