title: Google Maps won't zoom. Stuck on seeing the whole world
body: <p>As the title says, I have Google Map v2 working, but it won't zoom in. The blue dot appears to show my location but I have the whole world being shown too. I need a map that has everything disabled. You can't zoom in or out, you can't use gestures and the position is fixed to a certain distance around your location. As a result this is quite a big problem. I'm using a navigation drawer and this is one of the Fragments attached to it + the xml:</p>
  
  <pre><code>public class MapsPage extends Fragment {
  
  Context mContext;
  private SupportMapFragment mapFrag;
  private GoogleMap gMap;
  private double getLat, getLng;
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
  
      View view = inflater.inflate(R.layout.map_page, container, false);
  
      return view;
  }
  
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
      super.onActivityCreated(savedInstanceState);
      FragmentManager fm = getChildFragmentManager();
      mapFrag = (SupportMapFragment) fm.findFragmentById(R.id.map);
      if (mapFrag == null) {
          mapFrag = SupportMapFragment.newInstance();
          fm.beginTransaction().replace(R.id.map, mapFrag).commit();
      }
  }
  
  @Override
  public void onResume() {
      super.onResume();
      if (gMap == null) {
          gMap = mapFrag.getMap();
  
          gMap.getUiSettings().setZoomControlsEnabled(false);
          gMap.getUiSettings().setCompassEnabled(false);
          gMap.getUiSettings().setMyLocationButtonEnabled(true);
          gMap.getUiSettings().setAllGesturesEnabled(false);
          gMap.setMyLocationEnabled(true);
          getLat = gMap.getMyLocation().getLatitude();
          getLng = gMap.getMyLocation().getLongitude();
  
          final LatLng myLocation = new LatLng(getLat, getLng);
  
          CameraPosition cPosition = new CameraPosition.Builder()
              .target(myLocation)
              .zoom(16)
              .bearing(10)
              .tilt(30)
              .build();
          gMap.animateCamera(CameraUpdateFactory.newCameraPosition(cPosition));
      }
  }
  
  @Override
  public void onViewCreated(View view, Bundle savedInstanceState){
      super.onViewCreated(view, savedInstanceState);
  
  }
  @Override
  public void onCreate(Bundle savedInstanceState){
      super.onCreate(savedInstanceState);
  
  }
  @Override
  public void onAttach(Activity activity) {
      super.onAttach(activity);
  }
  public void setupMap(){
      Log.d("SUCCESS" , "SUCCESS");
  }
  </code></pre>
  
  <p>The Layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:map="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
  &lt;RelativeLayout
      android:id="@+id/map"
      android:layout_height="match_parent"
      android:layout_width="match_parent"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I learnt to put my code in the onResume, I can't remember why but if there is a better way please let me know. Right now for the map to load I have to turn my phones screen off then on again. Obviously I will change it in due course, I just want the thing to work first.</p>
  
  <p>I get two errors in the logcat, one about the activity pausing when it was not resumed. I'm sure I can fix this when I get everything out of my onResume so I think it's unrelated: </p>
  
  <pre><code>01-03 09:02:38.519: E/ActivityThread(16906): Performing pause of activity that
  is not resumed: {package.name.and.Activity.class}
  </code></pre>
  
  <p>I haven't called the onResume method in my activity class, the one that handles the Fragments so it's probably that, unrelated to this problem though (I think).</p>
  
  <p>The other, is telling me the Google Play Services library cannot be found. I searched StackOverflow for this and there seems to be a bug when using setMyLocationEnabled that causes this, or so some people think, others don't. I'm ignoring it for now since the maps are loading, and my location is being shown, it just won't zoom into the level I set.</p>
  
  <pre><code>01-03 09:02:44.824: E/GooglePlayServicesUtil(16906): The Google Play services
  resources were not found. Check your project configuration to ensure that
  the resources are included.
  </code></pre>
  
  <p>Any ideas of how to fix the zooming or code screwups leading to that? Would really appreciate your help, thanks in advance.</p>
  
  <p><strong>EDIT:</strong> i've used LocationManager instead to get the map to zoom into the position, that works, it's just not as accurate as the blue dot . It gets the end of my street but not anything but doesn't zoom onto the blue dot, something I will work on.</p>