title: Cannot convert type 'Android.Support.V4.App.Fragment' to 'Android.Gms.Maps.MapFragment'
body: <p>I am using Xamarin and am recoding a Google Maps application to use Android.Support.V4.App.Fragments with a View Pager.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>private void InitMapFragment()
  {
      _mapFragment = FragmentManager.FindFragmentByTag("map") as MapFragment;
      if (_mapFragment == null)
      {
          GoogleMapOptions mapOptions = new GoogleMapOptions()
              .InvokeMapType(GoogleMap.MapTypeNormal)
              .InvokeZoomControlsEnabled(true)
              .InvokeCompassEnabled(true);
  
          FragmentTransaction fragTx = FragmentManager.BeginTransaction();
          _mapFragment = MapFragment.NewInstance(mapOptions);
          fragTx.Add(Resource.Id.mapWithOverlay, _mapFragment, "map");
          fragTx.Commit();
      }
  }
  </code></pre>
  
  <p>Because I am now extending the Activity to use Android.Support.V4.App.Fragment, I am getting the following errors when compiling:</p>
  
  <blockquote>
    <p>Error CS0039: Cannot convert type 'Android.Support.V4.App.Fragment' to
    'Android.Gms.Maps.MapFragment' via a reference conversion, boxing
    conversion, unboxing conversion, wrapping conversion, or null type
    conversion (CS0039)</p>
  </blockquote>
  
  <p>At the line:</p>
  
  <pre><code>_mapFragment = FragmentManager.FindFragmentByTag("map") as MapFragment
  </code></pre>
  
  <p>As well as:</p>
  
  <blockquote>
    <p>Error CS0029: Cannot implicitly convert type
    'Android.Support.V4.App.FragmentTransaction' to
    'Android.App.FragmentTransaction' (CS0029)</p>
  </blockquote>
  
  <p>At the line:</p>
  
  <pre><code>FragmentTransaction fragTx = FragmentManager.BeginTransaction()
  </code></pre>
  
  <p>Can I have some help to get this code working?</p>
  
  <p>Thanks in advance</p>