Merge branch 'master' of https://github.com/osmandapp/Osmand
This commit is contained in:
commit
fc3f85e0fb
12 changed files with 159 additions and 26 deletions
|
@ -2142,4 +2142,8 @@
|
|||
<string name="favorite_category_name">Назва катэгорыі</string>
|
||||
<string name="favorite_category_add_new_title">Дадаць новую катэгорыю</string>
|
||||
<string name="favorite_category_dublicate_message">Катэгорыя з пазначанай назвай ужо існуе. Калі ласка, падайце іншую назву.</string>
|
||||
<string name="confirm_download_roadmaps">Вы ўпэўненыя, што хочаце сьцягнуць мапу аўтадарог, нават калі ў вас ёсць поўная мапа?</string>
|
||||
<string name="value_downloaded_from_max">%1$.1f з %2$.1f Мб</string>
|
||||
<string name="file_size_in_mb">%.1f Мб</string>
|
||||
<string name="update_all">Абнавіць усе (%1$s Мб)</string>
|
||||
</resources>
|
||||
|
|
|
@ -2132,4 +2132,50 @@
|
|||
<string name="poi_castle_type_castrum">Borgtype: castrum</string>
|
||||
<string name="poi_castle_type_shiro">Borgtype: shiro</string>
|
||||
|
||||
<string name="poi_massage_thai">Massage: thailandsk</string>
|
||||
<string name="poi_massage_sexual">Massage: erotisk</string>
|
||||
<string name="poi_massage_chinese">Massage: kinesisk</string>
|
||||
<string name="poi_massage_yes">Massage tjenester</string>
|
||||
<string name="poi_massage_therapeutic">Massage: terapeutisk</string>
|
||||
|
||||
<string name="poi_sauna_yes">Sauna tjenester</string>
|
||||
<string name="poi_solarium_yes">Solarium tjenester</string>
|
||||
|
||||
<string name="poi_tents_yes">Telte tilladt</string>
|
||||
<string name="poi_tents_no">Telte ikke tilladt</string>
|
||||
<string name="poi_openfire_yes">Åben ild tilladt</string>
|
||||
<string name="poi_openfire_no">Åben ild ikke tilladt</string>
|
||||
<string name="poi_backcountry_yes">Vildmarkscampingplads</string>
|
||||
<string name="poi_backcountry_no">Vildmarkscampingplads: nej</string>
|
||||
<string name="poi_scout_yes">Spejderlejr: ja</string>
|
||||
<string name="poi_scout_no">Spejderlejr: nej</string>
|
||||
<string name="poi_group_only_yes">Kun grupper: ja</string>
|
||||
<string name="poi_group_only_no">Kun grupper: nej</string>
|
||||
<string name="poi_washing_machine_yes">Vaskemaskine: ja</string>
|
||||
<string name="poi_washing_machine_no">Vaskemaskine: nej</string>
|
||||
<string name="poi_shower_yes">Brusebad: ja</string>
|
||||
<string name="poi_shower_no">Brusebad: nej</string>
|
||||
<string name="poi_shower_hot">Brusebad: varmtvand</string>
|
||||
<string name="poi_shower_outdoor">Brusebad: udendørs</string>
|
||||
<string name="poi_shower_cold">Brusebad: koldtvand</string>
|
||||
<string name="poi_shower_indoor">Brusebad: indendørs</string>
|
||||
<string name="poi_caravans_yes">Campingvogne: ja</string>
|
||||
<string name="poi_caravans_no">Campingvogne: nej</string>
|
||||
<string name="poi_impromptu_yes">Improviseret: ja</string>
|
||||
<string name="poi_impromptu_no">Improviseret: nej</string>
|
||||
<string name="poi_sanitary_dump_station_yes">Sanitære dump station: ja</string>
|
||||
<string name="poi_sanitary_dump_station_no">Sanitære dump station: nej</string>
|
||||
<string name="poi_sanitary_dump_station_customers">Sanitær dump station: kun kunder</string>
|
||||
<string name="poi_power_supply_yes">Strømforsyning: ja</string>
|
||||
<string name="poi_power_supply_no">Strømforsyning: nej</string>
|
||||
<string name="poi_power_supply_cee_17_blue">Strømforsyning (stik): CEE 17 blå</string>
|
||||
<string name="poi_power_supply_cee_7_4">Strømforsyning (stik): CEE 7/4</string>
|
||||
<string name="poi_power_supply_cee_7_5">Strømforsyning (stik): CEE 7/5</string>
|
||||
<string name="poi_power_supply_nema_5_15">Strømforsyning (stik): NEMA 5-15</string>
|
||||
|
||||
<string name="poi_capacity_tents">Maks antal telte</string>
|
||||
<string name="poi_capacity_caravans">Maks antal campingvogne</string>
|
||||
<string name="poi_dog_yes">Hunde tilladt</string>
|
||||
<string name="poi_dog_no">Hunde ikke tilladt</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1999,7 +1999,7 @@
|
|||
<string name="storage_directory_internal_app">Intern programhukommelse</string>
|
||||
<string name="storage_directory_manual">Manuelt angivet</string>
|
||||
<string name="storage_directory_default">Internhukommelse</string>
|
||||
<string name="storage_directory">Kortagring</string>
|
||||
<string name="storage_directory">Kortlagring</string>
|
||||
<string name="shared_string_copy">Kopier</string>
|
||||
<string name="application_dir_change_warning3">Skal OsmAnd også kopiere datafilerne til den nye placering?</string>
|
||||
<string name="rendering_attr_hideHouseNumbers_name">Skjul husnumre</string>
|
||||
|
@ -2184,4 +2184,6 @@
|
|||
<string name="value_downloaded_from_max">%1$.1f af %2$.1f MB</string>
|
||||
<string name="file_size_in_mb">%.1f MB</string>
|
||||
<string name="update_all">Opdater alle (%1$s Mb)</string>
|
||||
</resources>
|
||||
<string name="free_downloads_used_description">Se hvormange gratis filhentninger der er brugt</string>
|
||||
<string name="free_downloads_used">Gratis filhentninger brugt</string>
|
||||
</resources>
|
||||
|
|
|
@ -2124,4 +2124,9 @@
|
|||
<string name="poi_power_supply_cee_7_5">Источник питания (разъём): CEE 7/5</string>
|
||||
<string name="poi_power_supply_nema_5_15">Источник питания (разъём): NEMA 5-15</string>
|
||||
|
||||
<string name="poi_capacity_tents">Максимальное число палаток</string>
|
||||
<string name="poi_capacity_caravans">Максимальное число автоприцепов</string>
|
||||
<string name="poi_dog_yes">Вход с собаками разрешён</string>
|
||||
<string name="poi_dog_no">Вход с собаками запрещён</string>
|
||||
|
||||
</resources>
|
|
@ -2046,4 +2046,6 @@
|
|||
<string name="confirm_download_roadmaps">Är du säker på att du vill hämta vägkartan trots att du redan har en fullständig karta?</string>
|
||||
<string name="value_downloaded_from_max">%1$.1f av %2$.1f MB</string>
|
||||
<string name="update_all">Uppdatera alla (%1$s MB)</string>
|
||||
<string name="free_downloads_used">Gratis nedladdningar hämtade</string>
|
||||
<string name="free_downloads_used_description">Du kan ange hur många gratis nedladdningar som du har gjort</string>
|
||||
</resources>
|
||||
|
|
|
@ -1881,4 +1881,18 @@
|
|||
<string name="poi_bridge_bicycle">自行車橋梁</string>
|
||||
<string name="poi_bridge_railway">鐵路橋梁</string>
|
||||
<string name="poi_bridge_waterway">水路橋梁</string>
|
||||
<string name="poi_bridge_structure_beam">橋樑結構:梁式</string>
|
||||
<string name="poi_bridge_structure_simple_suspension">橋樑結構:簡懸式</string>
|
||||
<string name="poi_bridge_structure_suspension">橋樑結構:懸吊式</string>
|
||||
<string name="poi_bridge_structure_arch">橋樑結構:拱式</string>
|
||||
<string name="poi_bridge_structure_truss">橋樑結構:桁架式</string>
|
||||
<string name="poi_bridge_structure_floating">橋樑結構:浮動式</string>
|
||||
<string name="poi_bridge_structure_humpback">橋樑結構:弓形</string>
|
||||
<string name="poi_bridge_structure_cable_stayed">橋樑結構:斜張式</string>
|
||||
<string name="poi_bridge_structure_boardwalk">橋樑結構:木板式</string>
|
||||
<string name="poi_bridge_structure_simple_wooden">橋樑結構:簡單木板</string>
|
||||
<string name="poi_bridge_structure_viaduct">橋樑結構:高架式</string>
|
||||
<string name="poi_bridge_structure_aqueduct">橋樑結構:高架渠式</string>
|
||||
<string name="poi_bridge_structure_log">橋樑結構:圓木式</string>
|
||||
<string name="poi_bridge_type_movable">橋樑類型:活動型</string>
|
||||
</resources>
|
||||
|
|
|
@ -2163,4 +2163,6 @@
|
|||
<string name="value_downloaded_from_max">%1$.1f 從 %2$.1f MB</string>
|
||||
<string name="file_size_in_mb">%.1f MB</string>
|
||||
<string name="update_all">更新全部 (%1$s Mb)</string>
|
||||
<string name="free_downloads_used">免費下載使用</string>
|
||||
<string name="free_downloads_used_description">您可以設置,您有使用多少免費下載</string>
|
||||
</resources>
|
||||
|
|
|
@ -2128,4 +2128,9 @@
|
|||
<string name="poi_power_supply_cee_7_5">Power supply (socket): CEE 7/5</string>
|
||||
<string name="poi_power_supply_nema_5_15">Power supply (socket): NEMA 5-15</string>
|
||||
|
||||
<string name="poi_capacity_tents">Maximum tents</string>
|
||||
<string name="poi_capacity_caravans">Maximum caravans</string>
|
||||
<string name="poi_dog_yes">Dogs allowed</string>
|
||||
<string name="poi_dog_no">Dogs not allowed</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -17,6 +17,7 @@ import android.os.Message;
|
|||
import android.support.v4.app.NotificationCompat.Builder;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.NotificationCompat;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
|
@ -545,8 +546,8 @@ public class MapActivity extends AccessibleActivity {
|
|||
dashboardOnMap.hideDashboard();
|
||||
}
|
||||
if (mapLabelToShow != null) {
|
||||
contextMenuOnMap.setMapCenter(latLonToShow);
|
||||
contextMenuOnMap.show(latLonToShow, mapLabelToShow, toShow);
|
||||
//mapLayers.getContextMenuLayer().setLocation(latLonToShow, mapLabelToShow.getFullPlainName(this));
|
||||
}
|
||||
if (!latLonToShow.equals(cur)) {
|
||||
mapView.getAnimatedDraggingThread().startMoving(latLonToShow.getLatitude(),
|
||||
|
|
|
@ -7,9 +7,11 @@ import android.content.DialogInterface;
|
|||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v7.widget.PopupMenu;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
|
@ -34,6 +36,7 @@ import net.osmand.plus.activities.MapActivity;
|
|||
import net.osmand.plus.activities.OsmAndListFragment;
|
||||
import net.osmand.plus.activities.search.SearchActivity.SearchActivityChild;
|
||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
||||
import net.osmand.plus.dialogs.DirectionsDialogs;
|
||||
import net.osmand.plus.helpers.SearchHistoryHelper;
|
||||
import net.osmand.plus.helpers.SearchHistoryHelper.HistoryEntry;
|
||||
import net.osmand.util.MapUtils;
|
||||
|
@ -80,10 +83,10 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
|||
Builder bld = new AlertDialog.Builder(getActivity());
|
||||
bld.setMessage(R.string.confirmation_to_clear_history);
|
||||
bld.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
clearWithoutConfirmation();
|
||||
clearWithoutConfirmation();
|
||||
}
|
||||
});
|
||||
bld.setNegativeButton(R.string.shared_string_no, null);
|
||||
|
@ -190,6 +193,22 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
|||
MapActivity.launchMapActivityMoveToTop(getActivity());
|
||||
}
|
||||
|
||||
private void selectModelOptions(final HistoryEntry model, View v) {
|
||||
final PopupMenu optionsMenu = new PopupMenu(getActivity(), v);
|
||||
MenuItem item = optionsMenu.getMenu().add(
|
||||
R.string.shared_string_delete).setIcon(
|
||||
getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_delete_dark));
|
||||
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
helper.remove(model);
|
||||
historyAdapter.remove(model);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
optionsMenu.show();
|
||||
}
|
||||
|
||||
class HistoryAdapter extends ArrayAdapter<HistoryEntry> {
|
||||
private LatLon location;
|
||||
|
||||
|
@ -222,7 +241,7 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA
|
|||
options.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
selectModel(historyEntry);
|
||||
selectModelOptions(historyEntry, v);
|
||||
}
|
||||
});
|
||||
return row;
|
||||
|
|
|
@ -37,6 +37,8 @@ public class MapContextMenu {
|
|||
private Object object;
|
||||
MenuController menuController;
|
||||
|
||||
private LatLon mapCenter;
|
||||
|
||||
private int leftIconId;
|
||||
private Drawable leftIcon;
|
||||
private String nameStr;
|
||||
|
@ -55,6 +57,7 @@ public class MapContextMenu {
|
|||
private static final String KEY_CTX_MENU_TYPE_STR = "key_ctx_menu_type_str";
|
||||
private static final String KEY_CTX_MENU_STREET_STR = "key_ctx_menu_street_str";
|
||||
private static final String KEY_CTX_MENU_ADDR_UNKNOWN = "key_ctx_menu_addr_unknown";
|
||||
private static final String KEY_CTX_MENU_MAP_CENTER = "key_ctx_menu_map_center";
|
||||
|
||||
public boolean isActive() {
|
||||
return active;
|
||||
|
@ -68,6 +71,14 @@ public class MapContextMenu {
|
|||
return latLon;
|
||||
}
|
||||
|
||||
public LatLon getMapCenter() {
|
||||
return mapCenter;
|
||||
}
|
||||
|
||||
public void setMapCenter(LatLon mapCenter) {
|
||||
this.mapCenter = mapCenter;
|
||||
}
|
||||
|
||||
public PointDescription getPointDescription() {
|
||||
return pointDescription;
|
||||
}
|
||||
|
@ -388,6 +399,7 @@ public class MapContextMenu {
|
|||
bundle.putString(KEY_CTX_MENU_TYPE_STR, typeStr);
|
||||
bundle.putString(KEY_CTX_MENU_STREET_STR, streetStr);
|
||||
bundle.putString(KEY_CTX_MENU_ADDR_UNKNOWN, Boolean.toString(addressUnknown));
|
||||
bundle.putSerializable(KEY_CTX_MENU_MAP_CENTER, mapCenter);
|
||||
}
|
||||
|
||||
public void restoreMenuState(Bundle bundle) {
|
||||
|
@ -406,6 +418,11 @@ public class MapContextMenu {
|
|||
active = false;
|
||||
}
|
||||
|
||||
Object mapCenterObj = bundle.getSerializable(KEY_CTX_MENU_MAP_CENTER);
|
||||
if (mapCenterObj != null) {
|
||||
mapCenter = (LatLon) mapCenterObj;
|
||||
}
|
||||
|
||||
nameStr = bundle.getString(KEY_CTX_MENU_NAME_STR);
|
||||
typeStr = bundle.getString(KEY_CTX_MENU_TYPE_STR);
|
||||
streetStr = bundle.getString(KEY_CTX_MENU_STREET_STR);
|
||||
|
|
|
@ -74,10 +74,10 @@ public class MapContextMenuFragment extends Fragment {
|
|||
private int markerPaddingXPx;
|
||||
|
||||
private OsmandMapTileView map;
|
||||
private double origMapCenterLat;
|
||||
private double origMapCenterLon;
|
||||
private LatLon mapCenter;
|
||||
private int origMarkerX;
|
||||
private int origMarkerY;
|
||||
private boolean customMapCenter;
|
||||
|
||||
private class SingleTapConfirm implements OnGestureListener {
|
||||
|
||||
|
@ -135,13 +135,20 @@ public class MapContextMenuFragment extends Fragment {
|
|||
}
|
||||
|
||||
map = getMapActivity().getMapView();
|
||||
origMapCenterLat = map.getLatitude();
|
||||
origMapCenterLon = map.getLongitude();
|
||||
RotatedTileBox box = map.getCurrentRotatedTileBox();
|
||||
double markerLat = menu.getLatLon().getLatitude();
|
||||
double markerLon = menu.getLatLon().getLongitude();
|
||||
origMarkerX = (int)box.getPixXFromLatLon(markerLat, markerLon);
|
||||
origMarkerY = (int)box.getPixYFromLatLon(markerLat, markerLon);
|
||||
RotatedTileBox box = map.getCurrentRotatedTileBox().copy();
|
||||
customMapCenter = menu.getMapCenter() != null;
|
||||
if (!customMapCenter) {
|
||||
mapCenter = box.getCenterLatLon();
|
||||
menu.setMapCenter(mapCenter);
|
||||
double markerLat = menu.getLatLon().getLatitude();
|
||||
double markerLon = menu.getLatLon().getLongitude();
|
||||
origMarkerX = (int)box.getPixXFromLatLon(markerLat, markerLon);
|
||||
origMarkerY = (int)box.getPixYFromLatLon(markerLat, markerLon);
|
||||
} else {
|
||||
mapCenter = menu.getMapCenter();
|
||||
origMarkerX = box.getCenterPixelX();
|
||||
origMarkerY = box.getCenterPixelY();
|
||||
}
|
||||
|
||||
view = inflater.inflate(R.layout.map_context_menu_fragment, container, false);
|
||||
mainView = view.findViewById(R.id.context_menu_main);
|
||||
|
@ -409,7 +416,8 @@ public class MapContextMenuFragment extends Fragment {
|
|||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
map.setLatLon(origMapCenterLat, origMapCenterLon);
|
||||
map.setLatLon(mapCenter.getLatitude(), mapCenter.getLongitude());
|
||||
menu.setMapCenter(null);
|
||||
getMapActivity().getMapLayers().getMapControlsLayer().setControlsClickable(true);
|
||||
}
|
||||
|
||||
|
@ -447,6 +455,11 @@ public class MapContextMenuFragment extends Fragment {
|
|||
obs.removeGlobalOnLayoutListener(this);
|
||||
}
|
||||
|
||||
if (origMarkerX == 0 && origMarkerY == 0) {
|
||||
origMarkerX = view.getWidth() / 2;
|
||||
origMarkerY = view.getHeight() / 2;
|
||||
}
|
||||
|
||||
doLayoutMenu();
|
||||
}
|
||||
|
||||
|
@ -454,25 +467,24 @@ public class MapContextMenuFragment extends Fragment {
|
|||
}
|
||||
|
||||
private void showOnMap(LatLon latLon, boolean updateCoords, boolean ignoreCoef) {
|
||||
MapActivity ctx = getMapActivity();
|
||||
AnimateDraggingMapThread thread = ctx.getMapView().getAnimatedDraggingThread();
|
||||
int fZoom = ctx.getMapView().getZoom();
|
||||
AnimateDraggingMapThread thread = map.getAnimatedDraggingThread();
|
||||
int fZoom = map.getZoom();
|
||||
double flat = latLon.getLatitude();
|
||||
double flon = latLon.getLongitude();
|
||||
|
||||
RotatedTileBox cp = ctx.getMapView().getCurrentRotatedTileBox().copy();
|
||||
RotatedTileBox cp = map.getCurrentRotatedTileBox().copy();
|
||||
if (ignoreCoef) {
|
||||
cp.setCenterLocation(0.5f, 0.5f);
|
||||
} else {
|
||||
cp.setCenterLocation(0.5f, ctx.getMapView().getMapPosition() == OsmandSettings.BOTTOM_CONSTANT ? 0.15f : 0.5f);
|
||||
cp.setCenterLocation(0.5f, map.getMapPosition() == OsmandSettings.BOTTOM_CONSTANT ? 0.15f : 0.5f);
|
||||
}
|
||||
cp.setLatLonCenter(flat, flon);
|
||||
flat = cp.getLatFromPixel(cp.getPixWidth() / 2, cp.getPixHeight() / 2);
|
||||
flon = cp.getLonFromPixel(cp.getPixWidth() / 2, cp.getPixHeight() / 2);
|
||||
|
||||
if (updateCoords) {
|
||||
origMapCenterLat = flat;
|
||||
origMapCenterLon = flon;
|
||||
mapCenter = new LatLon(flat, flon);
|
||||
menu.setMapCenter(mapCenter);
|
||||
origMarkerX = cp.getCenterPixelX();
|
||||
origMarkerY = cp.getCenterPixelY();
|
||||
}
|
||||
|
@ -558,15 +570,19 @@ public class MapContextMenuFragment extends Fragment {
|
|||
mainView.setPadding(0, y, 0, 0);
|
||||
fabView.setPadding(0, getFabY(y), 0, 0);
|
||||
}
|
||||
adjustMapPosition(y, animated);
|
||||
if (!customMapCenter) {
|
||||
adjustMapPosition(y, animated);
|
||||
} else {
|
||||
customMapCenter = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void adjustMapPosition(int y, boolean animated) {
|
||||
double markerLat = menu.getLatLon().getLatitude();
|
||||
double markerLon = menu.getLatLon().getLongitude();
|
||||
RotatedTileBox box = map.getCurrentRotatedTileBox();
|
||||
RotatedTileBox box = map.getCurrentRotatedTileBox().copy();
|
||||
|
||||
LatLon latlon = new LatLon(origMapCenterLat, origMapCenterLon);
|
||||
LatLon latlon = mapCenter;
|
||||
if (menu.isLandscapeLayout()) {
|
||||
int markerX = (int)box.getPixXFromLatLon(markerLat, markerLon);
|
||||
int x = dpToPx(menu.getLandscapeWidthDp());
|
||||
|
|
Loading…
Reference in a new issue