コード例 #1
0
 public GeoPoint getLastKnownLocationAsGeoPoint() {
   // Location loc = null;
   // Criteria
   Criteria criteria = new Criteria();
   criteria.setAccuracy(Criteria.ACCURACY_FINE);
   criteria.setAltitudeRequired(false);
   // Ask Last Location
   Location lastKnownLocation =
       locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, true));
   lastFix = lastKnownLocation;
   GeoPoint myGeoPoint = GeoLocHelper.convertLocationAsGeoPoint(lastKnownLocation);
   return myGeoPoint;
 }
コード例 #2
0
 public GeoPoint getMyLocation() {
   GeoPoint myGeoPoint = GeoLocHelper.convertLocationAsGeoPoint(lastFix);
   return myGeoPoint;
 }