Android中的UI错误使用谷歌地图apiv2片段

时间:2013-02-21 10:16:49

标签: android android-layout google-maps-api-2


我在我的项目中使用过谷歌地图API v2,在布局文件中我使用了以下代码,它完美地工作但是在ui设计中滚动活动时会形成黑色图层,

enter image description here

<ScrollView
-----
--->

<LinearLayout
-----
----->
//bla bla bla
<fragment
    xmlns:map="http://schemas.android.com/apk/res-auto"
        android:id="@+id/mapview1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        class="com.google.android.gms.maps.MapFragment" 
         map:cameraZoom="15"
       />

//bla bla bla
</LinearLayout
-----
----->
</ScrollView
-----
--->

2 个答案:

答案 0 :(得分:0)

最后我得到了这个错误的答案。这是不正确的,但它是避免此类错误的另一种方法。请参阅此链接click here

答案 1 :(得分:0)

另一种替代解决方案是使用新的GoogleMap.snapshot()功能,并使用地图的屏幕截图;正如here所述。