getMapAsync() in Fragment

后端 未结 4 1658
旧时难觅i
旧时难觅i 2020-12-05 05:19

I having trouble implementing Google Map in Fragment.

This is my the part of my fragment class:

public class FragmentStoreFinderMap extends Fragment          


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-05 06:15

     SupportMapFragment mMapFragment = SupportMapFragment.newInstance();
     FragmentTransaction fragmentTransaction =
     getChildFragmentManager().beginTransaction();
     fragmentTransaction.add(R.id.flMap, mMapFragment);
     fragmentTransaction.commit();
     mMapFragment.getMapAsync(this);
    

提交回复
热议问题