In my project im trying to implementthis solution for managing a map in a dynamic added fragment.
public class MapFragment extends Fragment {
private GoogleM
Since you are using nested fragments, you should use getChildFragmentManager()
SupportMapFragment mapFragment = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map);
And I recommend you to use getMapAsync method, because getMap is deprecated
mapFragment.getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(GoogleMap googleMap) {
setupMap(googleMap);
}
});