나는 MapFragment가를 감싸는 단편이이 응용 프로그램의 구걸에 생성 한 새로운 구글지도 API를 v2를Google지도 API v2의 여러지도 조각 문제는
와 함께 몇 가지 문제를 실험했다.
사용자가 버튼을 클릭 할 때 생성되는 다른 부분으로,이 내용은 다른 mapFragment입니다.
하지만이지도는 첫 번째 조각에 표시되는 첫 번째지도를 보여줍니다. 또한 얼어 붙어서 행동을 취할 수 없습니다 ...
일부 사용자는 멀티 맵을 표시하는 데 어려움이 있음을 읽었습니다. 어떻게하면이 문제를 해결할 수 있을까요?
mMapFragment = (SupportMapFragment) this.getActivity().getSupportFragmentManager()
.findFragmentByTag(MAP_FRAGMENT_TAG);
// We only create a fragment if it doesn't already exist.
if (mMapFragment == null) {
// To programmatically add the map, we first create a
// SupportMapFragment.
mMapFragment = SupportMapFragment.newInstance();
mMapFragment.setRetainInstance(false);
// Then we add it using a FragmentTransaction.
FragmentTransaction fragmentTransaction = this.getActivity().getSupportFragmentManager()
.beginTransaction();
fragmentTransaction.add(R.id.ly_map, mMapFragment,MAP_FRAGMENT_TAG);
fragmentTransaction.commit();
} else {
dbug.log("Restoring map");
mMapFragment.setRetainInstance(false);
mMap = mMapFragment.getMap();
}
// We can't be guaranteed that the map is available because Google Play
// services might
// not be available.
setUpMapIfNeeded();
새로운 중첩 된 조각을 사용해보고 싶습니다. 아마도이 조각으로 작업 할 수 있기 때문입니다. – Marcel