使用radioGroup+fragment,切换每个fragment时,每个fragment里都有百度地图时,地图之间会互相的影响,切换后与切换前的地图出现了同步、卡顿等情况。
我的解决办法是:把引入地图的xml文件中的Mapview修改成TextureMapView,其他地方都是一样的使用。
<com.baidu.mapapi.map.MapView android:id="@+id/fragment_bmapView" android:layout_width="match_parent" android:layout_height="match_parent"/>
<com.baidu.mapapi.map.TextureMapView android:id="@+id/fragment_bmapView_2" android:layout_width="match_parent" android:layout_height="match_parent"/>