Issue
I am developing an Android application with MapView and I have a very strange behavior. There are some tiles with crosses in the map. But only on API level 7. On API level 8 and above, the map shows fine. This is not a problem with debug.keystore, I have also ripped of the code any mapController.setStreetView(true or false) and mapController.setSatelliteView(true or false). So i think this might be a bug in the maps jar but why only in API level 7? I want to release API level 7 above to have a bigger range of devices (Know many people that have API level 7 android).
Solution
Besides removing mapController.setStreetView(true), there is also another thing that should be added to the layout XML..
xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapa"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="YOUR API KEY"
android:clickable="true"></com.google.android.maps.MapView>
Note the xml namespace after com.google.android.maps.MapView. After adding the namespace, the cross tiles disappeared. Don't know if it's a bug or the namespace is necessary in order for the api render the map correctly. Either way, it worked.
Answered By - Raphael Ayres
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.