title: GetMap() undefined for the type MapFragment
body: <p>I am trying to get a map fragment working within my application and I continue to get an error when trying to get my GoogleMap object. </p>
  
  <blockquote>
    <p>MapFragment.java</p>
  </blockquote>
  
  <pre><code>import android.app.Fragment;
  import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  
  import com.google.android.gms.maps.GoogleMap;
  import com.google.android.gms.maps.model.LatLng;
  
  public class MapFragment extends Fragment {
  
  private GoogleMap map;
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
  
      View view = inflater.inflate(R.layout.fragment_map, container, false);
  
      map  = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
  
      return view;
      }
  }
  </code></pre>
  
  <p>And my frament code is </p>
  
  <blockquote>
    <p>fragment_map.xml</p>
  </blockquote>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
  
      &lt;Button
      android:id="@+id/btnEugene"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentRight="true"
      android:layout_alignParentTop="true"
      android:onClick="onClick_Eugene"
      android:text="Eugene" /&gt;
  
      &lt;Button
      android:id="@+id/btnHpc"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentLeft="true"
      android:layout_alignParentTop="true"
      android:onClick="onClick_HPC"
      android:text="HPC" /&gt;
  
      &lt;Button
      android:id="@+id/btnTheGrove"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:onClick="onClick_FG"
      android:text="Forest Grove" /&gt;
  
      &lt;fragment
      android:id="@+id/map"
      android:name="com.google.android.gms.maps.MapFragment"
      android:layout_below="@+id/btnTheGrove"
      android:gravity="center"
      android:layout_width="match_parent"
      android:layout_height="match_parent" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>The exact error I am getting is </p>
  
  <blockquote>
    <p>The method getMap() is undefined for the type MapFragment</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>