diff --git a/OsmAnd/res/layout/map_context_menu_fragment.xml b/OsmAnd/res/layout/map_context_menu_fragment.xml
index bfb51ff362..5fe1ee1efe 100644
--- a/OsmAnd/res/layout/map_context_menu_fragment.xml
+++ b/OsmAnd/res/layout/map_context_menu_fragment.xml
@@ -99,26 +99,26 @@
android:paddingTop="3dp">
+ osmand:typeface="@string/font_roboto_medium"/>
+ android:visibility="gone"/>
-
-
-
-
-
-
+ android:layout_marginBottom="@dimen/context_menu_direction_margin"
+ android:layout_marginTop="@dimen/context_menu_padding_margin_tiny"
+ android:gravity="top"
+ android:orientation="horizontal"
+ android:paddingBottom="3dp"
+ android:paddingLeft="@dimen/context_menu_padding_margin_default"
+ android:paddingRight="@dimen/context_menu_padding_margin_default"
+ android:paddingTop="3dp">
-
-
-
-
-
-
-
+ android:layout_height="wrap_content">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
@@ -723,13 +734,13 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
- android:scaleType="center"
- android:textColor="@color/abc_primary_text_material_dark"
- android:textSize="@dimen/abc_text_size_large_material"
android:ellipsize="end"
android:lines="1"
android:maxLines="1"
+ android:scaleType="center"
android:singleLine="true"
+ android:textColor="@color/abc_primary_text_material_dark"
+ android:textSize="@dimen/abc_text_size_large_material"
tools:text="Toolbar"
tools:visibility="visible"/>
diff --git a/OsmAnd/res/values-eo/strings.xml b/OsmAnd/res/values-eo/strings.xml
index b26442fe97..c6ebf77396 100644
--- a/OsmAnd/res/values-eo/strings.xml
+++ b/OsmAnd/res/values-eo/strings.xml
@@ -1859,7 +1859,7 @@ Proporcia memoro %4$s MB (limito de Android %5$s MB, Dalvik %6$s MB).
Malfermaj horoj
Malfermado de ŝanĝaro…
Fermado de ŝanĝaro…
- Enmetado de nodo…
+ Alŝutado de nodo…
Ŝargado de interesejoj…
Rajtigo malsukcesis
malsukcesis
diff --git a/OsmAnd/res/values-he/phrases.xml b/OsmAnd/res/values-he/phrases.xml
index e20cc77cd1..977b913953 100644
--- a/OsmAnd/res/values-he/phrases.xml
+++ b/OsmAnd/res/values-he/phrases.xml
@@ -1837,4 +1837,20 @@
פחם
נחושת
יהלומים
+ חתירה יחידנית במים עמוקים: יש
+ חתירה יחידנית במים עמוקים: אין
+
+ גובה הטיפוס
+ גובה טיפוס מזערי
+ גובה טיפוס מרבי
+ סלע טיפוס: אבן גיר
+ סלע טיפוס: גרניט
+ סלע טיפוס: אבן חול
+ סלע טיפוס: קוורציט
+ סלע טיפוס: גנייס
+ סלע טיפוס: פורפיר
+ איכות טיפוס: אחידה
+ איכות טיפוס: שבירה
+ ידיות קבועות: יש
+ ידיות קבועות: אין
diff --git a/OsmAnd/res/values-he/strings.xml b/OsmAnd/res/values-he/strings.xml
index acd37eb115..968bd71378 100644
--- a/OsmAnd/res/values-he/strings.xml
+++ b/OsmAnd/res/values-he/strings.xml
@@ -3068,4 +3068,16 @@
לשלוח את שאילתת החיפוש?
הגדלת רדיוס החיפוש ל־%1$s
הדרך נשלחת…
+ • ניווט: תיקון סרגל ההתקדמות, החלפה מהירה בין נקודות ההתחלה והסיום של המסלול
+\n
+\n • סמני מפה: תיקון כיבוי/הפעלה של קבוצות, אפשרות להסתיר סמנים במפה
+\n
+\n • עריכת OSM: היכולת לערוך תגיות לפריטים שאינם נקודה, תיקון תגובות חסרות על הערות, גיבוי עריכות
+\n
+\n • שיפור פענוח של ויקיפדיה ושל ויקימסע, קבצים מעודכנים כבר זמינים
+\n
+\n • תפריט הקשר: תיקון צבעי סימול כבישים במצב לילה, תיקון גדלי תפריט נוספים
+\n
+\n • תיקון תקלות נוספות
+\n
diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml
index 990fb2222c..0bac1403e9 100644
--- a/OsmAnd/res/values-zh-rTW/strings.xml
+++ b/OsmAnd/res/values-zh-rTW/strings.xml
@@ -3140,4 +3140,5 @@
\n • 其他錯誤修復
\n
將搜尋半徑增加到 %1$s
+ 正在提交路線…
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index c5a5d814c2..e3cf8d16af 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -14,9 +14,10 @@
• Navigation: Fix progress bar, fast swapping of the start and end point of the route\n\n
• Map markers: fix turn on/off groups, ability to hide markers from the map\n\n
- • OSM Edit: Ability to edit tags for non-point objects, fix missing comments on notes, backup of edits\n\n
+ • OSM Edit: Ability to edit tags for non-point objects and ways, fix missing comments on notes, backup of edits\n\n
• Improve Wikipedia and Wikivoyage parsing, updated files are already available\n\n
• Context menu: fix transport shields color in the night mode, fix additional menu sizes\n\n
+ • Boat navigation: support for waterway fairway\n\n
• Other bug fixes\n\n
Committing way…
diff --git a/OsmAnd/src/net/osmand/aidl/maplayer/point/AMapPoint.java b/OsmAnd/src/net/osmand/aidl/maplayer/point/AMapPoint.java
index 1ee499fc1e..1c11ea24a1 100644
--- a/OsmAnd/src/net/osmand/aidl/maplayer/point/AMapPoint.java
+++ b/OsmAnd/src/net/osmand/aidl/maplayer/point/AMapPoint.java
@@ -12,6 +12,8 @@ import java.util.Map;
public class AMapPoint implements Parcelable {
public static final String POINT_IMAGE_URI_PARAM = "point_image_uri_param";
+ public static final String POINT_SPEED_PARAM = "point_speed_param";
+ public static final String POINT_TYPE_ICON_NAME_PARAM = "point_type_icon_name_param";
private String id;
private String shortName;
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java
index 008e7fe493..d0e2256821 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java
@@ -1,36 +1,5 @@
package net.osmand.plus.mapcontextmenu;
-import static android.util.TypedValue.COMPLEX_UNIT_DIP;
-import static net.osmand.plus.mapcontextmenu.MenuBuilder.SHADOW_HEIGHT_TOP_DP;
-
-import java.util.List;
-
-import net.osmand.AndroidUtils;
-import net.osmand.data.LatLon;
-import net.osmand.data.PointDescription;
-import net.osmand.data.QuadPoint;
-import net.osmand.data.RotatedTileBox;
-import net.osmand.plus.LockableScrollView;
-import net.osmand.plus.OsmAndFormatter;
-import net.osmand.plus.OsmandApplication;
-import net.osmand.plus.OsmandSettings;
-import net.osmand.plus.R;
-import net.osmand.plus.UiUtilities.UpdateLocationViewCache;
-import net.osmand.plus.activities.MapActivity;
-import net.osmand.plus.base.BaseOsmAndFragment;
-import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents;
-import net.osmand.plus.mapcontextmenu.MenuController.MenuState;
-import net.osmand.plus.mapcontextmenu.MenuController.TitleButtonController;
-import net.osmand.plus.mapcontextmenu.MenuController.TitleProgressController;
-import net.osmand.plus.mapcontextmenu.controllers.TransportStopController;
-import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenu;
-import net.osmand.plus.transport.TransportStopRoute;
-import net.osmand.plus.views.AnimateDraggingMapThread;
-import net.osmand.plus.views.OsmandMapTileView;
-import net.osmand.plus.views.TransportStopsLayer;
-import net.osmand.plus.views.controls.HorizontalSwipeConfirm;
-import net.osmand.plus.views.controls.SingleTapConfirm;
-import net.osmand.util.Algorithms;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.annotation.TargetApi;
@@ -66,6 +35,38 @@ import android.widget.OverScroller;
import android.widget.ProgressBar;
import android.widget.TextView;
+import net.osmand.AndroidUtils;
+import net.osmand.data.LatLon;
+import net.osmand.data.PointDescription;
+import net.osmand.data.QuadPoint;
+import net.osmand.data.RotatedTileBox;
+import net.osmand.plus.LockableScrollView;
+import net.osmand.plus.OsmAndFormatter;
+import net.osmand.plus.OsmandApplication;
+import net.osmand.plus.OsmandSettings;
+import net.osmand.plus.R;
+import net.osmand.plus.UiUtilities.UpdateLocationViewCache;
+import net.osmand.plus.activities.MapActivity;
+import net.osmand.plus.base.BaseOsmAndFragment;
+import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents;
+import net.osmand.plus.mapcontextmenu.MenuController.MenuState;
+import net.osmand.plus.mapcontextmenu.MenuController.TitleButtonController;
+import net.osmand.plus.mapcontextmenu.MenuController.TitleProgressController;
+import net.osmand.plus.mapcontextmenu.controllers.TransportStopController;
+import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenu;
+import net.osmand.plus.transport.TransportStopRoute;
+import net.osmand.plus.views.AnimateDraggingMapThread;
+import net.osmand.plus.views.OsmandMapTileView;
+import net.osmand.plus.views.TransportStopsLayer;
+import net.osmand.plus.views.controls.HorizontalSwipeConfirm;
+import net.osmand.plus.views.controls.SingleTapConfirm;
+import net.osmand.util.Algorithms;
+
+import java.util.List;
+
+import static android.util.TypedValue.COMPLEX_UNIT_DIP;
+import static net.osmand.plus.mapcontextmenu.MenuBuilder.SHADOW_HEIGHT_TOP_DP;
+
public class MapContextMenuFragment extends BaseOsmAndFragment implements DownloadEvents {
public static final String TAG = "MapContextMenuFragment";
@@ -1478,7 +1479,8 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
TextView additionalInfoTextView = (TextView) view.findViewById(R.id.additional_info_text_view);
CharSequence additionalInfoStr = menu.getAdditionalInfo();
boolean showAdditionalImage = false;
- if (!TextUtils.isEmpty(additionalInfoStr)) {
+ boolean showAdditionalInfo = !TextUtils.isEmpty(additionalInfoStr);
+ if (showAdditionalInfo) {
int colorId = menu.getAdditionalInfoColor();
int additionalInfoIconRes = menu.getAdditionalInfoIconRes();
if (colorId != 0) {
@@ -1495,6 +1497,10 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
additionalInfoTextView.setVisibility(View.GONE);
}
additionalInfoImageView.setVisibility(showAdditionalImage ? View.VISIBLE : View.GONE);
+
+ boolean showSeparator = showAdditionalInfo && menu.displayDistanceDirection();
+ view.findViewById(R.id.info_compass_separator)
+ .setVisibility(showSeparator ? View.VISIBLE : View.GONE);
}
updateCompassVisibility();
updateAdditionalInfoVisibility();
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AMapPointMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AMapPointMenuController.java
index 0ade467b3d..1dfe9d3e82 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AMapPointMenuController.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AMapPointMenuController.java
@@ -12,6 +12,8 @@ import android.text.TextUtils;
import net.osmand.aidl.maplayer.point.AMapPoint;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
+import net.osmand.plus.OsmAndFormatter;
+import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.mapcontextmenu.MenuBuilder;
@@ -24,6 +26,9 @@ import java.io.InputStream;
public class AMapPointMenuController extends MenuController {
+ private static final float NO_SPEED = -1;
+ private static final int NO_ICON = 0;
+
private AMapPoint point;
private Drawable pointDrawable;
@@ -74,11 +79,11 @@ public class AMapPointMenuController extends MenuController {
@Override
public Drawable getSecondLineTypeIcon() {
- if (!Algorithms.isEmpty(point.getShortName())) {
- return getIcon(R.drawable.ic_small_group);
- } else {
- return null;
+ int id = getPointTypeIconId();
+ if (id != NO_ICON) {
+ return getIcon(id);
}
+ return null;
}
@NonNull
@@ -102,11 +107,64 @@ public class AMapPointMenuController extends MenuController {
}
}
+ @Override
+ public int getAdditionalInfoColorId() {
+ return R.color.icon_color;
+ }
+
+ @Override
+ public CharSequence getAdditionalInfoStr() {
+ MapActivity activity = getMapActivity();
+ if (activity != null) {
+ float speed = getPointSpeed();
+ if (speed != NO_SPEED) {
+ String formatted = OsmAndFormatter.getFormattedSpeed(speed, activity.getMyApplication());
+ return activity.getString(R.string.map_widget_speed) + ": " + formatted;
+ }
+ }
+ return super.getAdditionalInfoStr();
+ }
+
+ @Override
+ public int getAdditionalInfoIconRes() {
+ if (getPointSpeed() != NO_SPEED) {
+ return R.drawable.ic_action_speed_16;
+ }
+ return super.getAdditionalInfoIconRes();
+ }
+
@Override
public boolean needStreetName() {
return false;
}
+ private int getPointTypeIconId() {
+ MapActivity activity = getMapActivity();
+ if (activity != null) {
+ String iconName = point.getParams().get(AMapPoint.POINT_TYPE_ICON_NAME_PARAM);
+ if (!TextUtils.isEmpty(iconName)) {
+ OsmandApplication app = activity.getMyApplication();
+ return app.getResources().getIdentifier(iconName, "drawable", app.getPackageName());
+ }
+ }
+ if (!TextUtils.isEmpty(point.getShortName())) {
+ return R.drawable.ic_small_group;
+ }
+ return NO_ICON;
+ }
+
+ private float getPointSpeed() {
+ String speed = point.getParams().get(AMapPoint.POINT_SPEED_PARAM);
+ if (!TextUtils.isEmpty(speed)) {
+ try {
+ return Float.parseFloat(speed);
+ } catch (NumberFormatException e) {
+ return NO_SPEED;
+ }
+ }
+ return NO_SPEED;
+ }
+
@Nullable
private Drawable getPointDrawable() {
MapActivity mapActivity = getMapActivity();
diff --git a/OsmAnd/src/net/osmand/plus/views/AidlMapLayer.java b/OsmAnd/src/net/osmand/plus/views/AidlMapLayer.java
index 5d906fba81..1e83ff3742 100644
--- a/OsmAnd/src/net/osmand/plus/views/AidlMapLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/AidlMapLayer.java
@@ -173,8 +173,7 @@ public class AidlMapLayer extends OsmandMapLayer implements IContextMenuProvider
canvas.drawBitmap(image, null, getDstRect(x, y, smallIconSize / 2), bitmapPaint);
} else if (pointsType == PointsType.BIG_ICON) {
bitmapPaint.setColorFilter(null);
- // FIXME: vertical offset
- float vOffset = bigIconBg.getHeight() * 0.9f;
+ float vOffset = bigIconBg.getHeight() * 0.91f;
int imageCenterY = (int) (y - vOffset + bigIconBg.getHeight() / 2);
canvas.drawBitmap(bigIconBg, x - bigIconBg.getWidth() / 2, y - vOffset, bitmapPaint);
canvas.drawBitmap(image, null, getDstRect(x, imageCenterY, bigIconSize / 2), bitmapPaint);