title: Recycle Android Maps V2 SupportMapFragment when rotating
body: <p>I am looking to improve the performance of the SupportMapFragment when the device is rotated.  It seems as if the fragment must be recreated.  I am not sure of this, however when the device is rotated the map tiles must be reloaded.  It would make sense from a performance perspective to have the entire mapfragment retained and reused without having to re-instantiate the fragment.  Any insight into this would be appreciated.</p>
  
  <p>I am declaring the SupportMapFragment in xml and using the SetupMapIfNeeded() as described in the api docs.</p>
  
  <pre><code>private void setUpMapIfNeeded() {
      // Do a null check to confirm that we have not already instantiated the
      // map.
      if (mMap == null) {
          // Try to obtain the map from the SupportMapFragment.
          mMap = ((SupportMapFragment) getSupportFragmentManager()
                  .findFragmentById(R.id.map)).getMap();
          // Check if we were successful in obtaining the map.
          if (mMap != null) {
              setUpMap();
          }
      }
  }
  </code></pre>