@Override
  protected void onResume() {
    super.onResume();

    searchPoint = osmandSettings.getLastSearchedPoint();

    Intent intent = getIntent();
    if (intent != null) {
      selectAddressMode = intent.hasExtra(SELECT_ADDRESS_POINT_INTENT_KEY);
    } else {
      selectAddressMode = false;
    }
    findViewById(R.id.TopTextView).setVisibility(selectAddressMode ? View.VISIBLE : View.GONE);

    region = null;
    postcode = null;
    city = null;
    street = null;
    building = null;
    region = osmandSettings.getLastSearchedRegion();
    RegionAddressRepository reg =
        ((OsmandApplication) getApplication()).getResourceManager().getRegionRepository(region);
    if (reg != null && reg.useEnglishNames() != osmandSettings.USE_ENGLISH_NAMES.get()) {
      reg.setUseEnglishNames(osmandSettings.USE_ENGLISH_NAMES.get());
    }
    loadData();
    updateUI();
  }
 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);
     }
   }
 }