A
Astarte
Neues Mitglied
- 0
Ich will in mein app eine karte anzeigen lassen.
soweit funktioniert alles, nur bekomm ich keine karte zu sehen, sondern nur ein graues bild mit raster und meinen zoom-tasten.
hab die api-key schon paar mal geändert, bleibt aber grau.
hier noch meine daten:
manifest:
mein map.xml:
und meine Karte.java, die ich über ein intent starte:
soweit funktioniert alles, nur bekomm ich keine karte zu sehen, sondern nur ein graues bild mit raster und meinen zoom-tasten.
hab die api-key schon paar mal geändert, bleibt aber grau.
hier noch meine daten:
manifest:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.roland.pruefbericht"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<uses-library android:name="com.google.android.maps"/>
<activity
android:name="com.roland.pruefbericht.MainActivity"
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 android:name="com.roland.pruefbericht.NeuerKundeActivity"></activity>
<activity android:name="com.roland.pruefbericht.Kessel"></activity>
<activity android:name="com.roland.pruefbericht.Duese"></activity>
<activity android:name="com.roland.pruefbericht.Messergebnisse"></activity>
<activity android:name="com.roland.pruefbericht.Messgeraet"></activity>
<activity android:name="com.roland.pruefbericht.KesselActivity"></activity>
<activity android:name="com.roland.pruefbericht.NeuerKesselActivity"></activity>
<activity android:name="com.roland.pruefbericht.BerichtActivity"></activity>
<activity android:name="com.roland.pruefbericht.NeuerBerichtActivity"></activity>
<activity android:name="com.roland.pruefbericht.NeuerBericht2Activity"></activity>
<activity android:name="com.roland.pruefbericht.NeuerBericht3Activity"></activity>
<activity android:name="com.roland.pruefbericht.Karte"></activity>
</application>
</manifest>
Code:
<?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="AIzaSyCfmOBTfrw9N_BbluOu5ZNAklo5JPzfWQI" />
</RelativeLayout>
Code:
package com.roland.pruefbericht;
import android.os.Bundle;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.MyLocationOverlay;
public class Karte extends MapActivity{
MapView mapView;
MyLocationOverlay compass;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.map);
mapView = (MapView) findViewById(R.id.mapView);
mapView.setBuiltInZoomControls(true);
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}