protected void select(int mode) {
   LatLon searchPoint = settings.getLastSearchedPoint();
   AddressInformation ai = getAddressInformation();
   if (ai != null) {
     if (mode == ADD_TO_FAVORITE) {
       Bundle b = new Bundle();
       Dialog dlg = FavoriteDialogs.createAddFavouriteDialog(getActivity(), b);
       dlg.show();
       FavoriteDialogs.prepareAddFavouriteDialog(
           getActivity(),
           dlg,
           b,
           searchPoint.getLatitude(),
           searchPoint.getLongitude(),
           new PointDescription(PointDescription.POINT_TYPE_ADDRESS, ai.objectName));
     } else if (mode == NAVIGATE_TO) {
       DirectionsDialogs.directionsToDialogAndLaunchMap(
           getActivity(),
           searchPoint.getLatitude(),
           searchPoint.getLongitude(),
           ai.getHistoryName());
     } else if (mode == ADD_WAYPOINT) {
       DirectionsDialogs.addWaypointDialogAndLaunchMap(
           getActivity(),
           searchPoint.getLatitude(),
           searchPoint.getLongitude(),
           ai.getHistoryName());
     } else if (mode == SHOW_ON_MAP) {
       showOnMap(searchPoint, ai);
     }
   }
 }
 public void showOnMap(LatLon searchPoint, AddressInformation ai) {
   settings.setMapLocationToShow(
       searchPoint.getLatitude(), searchPoint.getLongitude(), ai.zoom, ai.getHistoryName());
   MapActivity.launchMapActivityMoveToTop(getActivity());
 }