Reputation: 7810
I have a problem with the MapView. Here's my scenario:
I can successfully create the MapActivity. The initial google maps is loaded. Everything works just fine.
After clicking on the map, trying to move it (or actually do anything), the map tiles are not loaded anymore. And it looks like on the image.
I have already found plenty of threads about not setting the Api Key correctly or whatever. I ensure you, that I have set this correctly (otherwise, the map wouldn't be loaded at all). Does anyone have a solution for this. The Api Level I am using is 8, and I am trying it for android 2.2 in the default emulator. Thanks.
Here is a snippet from the manifest:
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<application ...
Here is the layout file:
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:clickable="true"
android:state_enabled="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="..." >
</com.google.android.maps.MapView>
Here is the code from the activity, where I initialize the mapView:
mapView = (MapView) findViewById(R.id.map);
mapView.setStreetView(true);
mapView.setBuiltInZoomControls(true);
It also has a LocationListener, that just animates to the location it receives.
Upvotes: 0
Views: 400
Reputation: 50578
Check the API key and check mapView.setStreetView();
:)
Upvotes: 1