I can build an instance of Google Map and view the map but I can't getMap(), it's always null:
mMapFragment = SupportMapFragment.newInstance();
FragmentTransaction fragmentTransaction = getSupportFragmentManager()
.beginTransaction();
fragmentTransaction.replace(R.id.container, mMapFragment);
fragmentTransaction.commit();
if (mMap == null) {
mMap = mMapFragment.getMap();
// always null, why?
if (mMap != null) {
mMap.getUiSettings().setMyLocationButtonEnabled(true);
}
}