Example #1
0
 public void setMapLocationToShow(
     double latitude, double longitude, int zoom, String historyDescription) {
   Editor edit = globalPreferences.edit();
   edit.putFloat(MAP_LAT_TO_SHOW, (float) latitude);
   edit.putFloat(MAP_LON_TO_SHOW, (float) longitude);
   edit.putInt(MAP_ZOOM_TO_SHOW, zoom);
   edit.commit();
   if (historyDescription != null) {
     SearchHistoryHelper.getInstance()
         .addNewItemToHistory(latitude, longitude, historyDescription, ctx);
   }
 }
Example #2
0
 public boolean setPointToNavigate(double latitude, double longitude, String historyDescription) {
   boolean add =
       globalPreferences
           .edit()
           .putFloat(POINT_NAVIGATE_LAT, (float) latitude)
           .putFloat(POINT_NAVIGATE_LON, (float) longitude)
           .commit();
   if (add) {
     if (historyDescription != null) {
       SearchHistoryHelper.getInstance()
           .addNewItemToHistory(latitude, longitude, historyDescription, ctx);
     }
   }
   return add;
 }