title: googleMap.getMyLocation(); cannot get current location
body: <p>i want to make a program to calculate the distance between some places to my current location, but my googleMap.getMyLocation(); doesnt work properly.</p>
  
  <pre><code>googleMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
  googleMap.setMyLocationEnabled(true);   
  googleMap.getUiSettings().setCompassEnabled(false);
  mylocation = googleMap.getMyLocation();
  direction = new GMapV2Direction();
  
  LatLng from, to;
  from = new LatLng(-7.26071409, 112.80674726);
  for(int i=0; i&lt;lat.length; i++){    
      to = new LatLng(lat[i], lon[i]);
      doc = direksi.getDocument(from, to, GMapV2Direction.MODE_DRIVING);
      distance[i] = (double)direction.getDistanceValue(doc) / 1000;
  }
  </code></pre>
  
  <p>i saved the latitude and longitude of some places in lat[] and lon[].
  LatLng 'from' is mylocation and 'to' is my destination places.
  the problem appear when i change</p>
  
  <pre><code>from = new LatLng(-7.26071409, 112.80674726);
  to
  from = new LatLng(mylocation.getLatitude(), mylocation.getLongitude());
  </code></pre>
  
  <p>i want to do the calculation without opening the googlemaps. the google maps will appear when i touch the map button as pop up window. so the calculation will happen without opening googlemap</p>
  
  <p>please help me</p>