title: Add SupportMapFragment to a LinearLayout
body: <p>I need to add a SupportMapFragment created with AndroidStudio. The fragment activity that uses it works fine. It is showing a map with is marker on Sidney.
  But I need to put that map on a Layout (i.e., a LinearLayout) to add buttons and interact with the map.</p>
  
  <p>I create a class MapsActivity.java with its corresponding layout activity_maps.xml </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical" android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="Some Text"
          android:id="@+id/textView" /&gt;
  
  
      &lt;fragment xmlns:map="http://schemas.android.com/apk/res-auto"
          android:id="@+id/map"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:scrollbars="vertical"
          class="com.google.android.gms.maps.SupportMapFragment"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Being that: <em>public class MapsActivity extends <strong>AppCompatActivity</em></strong>, Inside the <em>MainActivity.onCreate()</em> I tried:</p>
  
  <p>1)</p>
  
  <pre><code>    android.support.v4.app.FragmentManager manager = getSupportFragmentManager();
      SupportMapFragment mapFragment = SupportMapFragment.newInstance();
      manager.beginTransaction().replace(R.id.map, mapFragment).commit();
      setContentView(R.layout.activity_maps);
      GoogleMap mMap = mapFragment.getMap();
      // NOT GOOD: nMap is null.
  </code></pre>
  
  <p>2)</p>
  
  <pre><code>    FragmentManager manager = getChildFragmentManager();
      [...]
      // NOT GOOD: Cannot resolve method getChildFragmentManager.
  </code></pre>
  
  <p>3)</p>
  
  <pre><code>    GoogleMap mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
      // NOT GOOD: nMap is null.
  </code></pre>
  
  <p>What can I try next?</p>