我正在用MapView开发一个安卓应用程序,我有一个非常奇怪的行为。地图上有一些带有十字的瓷砖。但仅在API级别7上。在API级别8和更高级别上,映射显示正常。这不是debug.keystore的问题,我还从代码中截取了任何mapController.setStreetView(真或假)和mapController.setSatelliteView(真或假)。所以我认为这可能是地图jar中的一个bug,但为什么只在API level 7中出现?我想在上面发布API level 7,以便有更多的设备(我知道很多人都有API level 7 android)。
发布于 2011-11-12 02:08:48
除了删除mapController.setStreetView(true)之外,还有一件事应该添加到布局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>请注意com.google.android.maps.MapView之后的xml名称空间。添加名称空间后,十字平铺消失。我不知道这是一个bug,还是为了让api正确地呈现贴图,命名空间是必需的。无论哪种方式,它都起作用了。
https://stackoverflow.com/questions/8083275
复制相似问题