title: How to animate the camera to a specified location in Google Maps v2 for Android?
body: <p>I'm having trouble moving the Google Maps camera back to the initial position. Basically, I have a home button on the Actionbar. If a user scrolls around the map, and taps the Home button, I would like the camera to move back to its original location.</p>
  
  <p>I get the original coordinates using <code>googleMap.getCameraPosition().target</code>, but the camera doesn't move.</p>
  
  <pre><code>@Override
  public boolean onOptionsItemSelected(MenuItem item)
  {
      LatLng initialLoc= mMap.getCameraPosition().target;
  
      CameraUpdate update = CameraUpdateFactory.newLatLng(initialLoc);
      CameraUpdate zoom = CameraUpdateFactory.zoomTo(15);
  
      mMap.moveCamera(update);
      mMap.animateCamera(zoom);
  
      return true;
  }
  </code></pre>
  
  <p>map.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;fragment
          xmlns:map="http://schemas.android.com/apk/res-auto"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/map"
          tools:context="org.test"
          android:name="com.google.android.gms.maps.SupportMapFragment"
          map:cameraTargetLat="xxx.xxx"
          map:cameraTargetLng="xxx.xxx"
          map:cameraZoom="15"
          map:mapType="normal" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>What is it that I am missing?</p>