Cannot add to fragment transaction due to the following error, how would you go about this?
add() in FragmentTransaction cannot be applied to:
Expected Parameters: Actual Arguments:
int R.id.mapWithOverlay
android.support.v4.app.Fragment _mapFragment (com.google.android.gms.maps.MapFragment)
String "map"
Code is as follows:
android.support.v4.app.FragmentTransaction fragTx = getSupportFragmentManager().beginTransaction();
if (fragTx != null) {
_mapFragment = MapFragment.newInstance(mapOptions);
fragTx.add(R.id.mapWithOverlay, _mapFragment, "map");
fragTx.commit();
} else {
Toast.makeText(this, "Could not display the map", Toast.LENGTH_SHORT).show();
}
Thanks in advance.