Merge remote-tracking branch 'origin/master' into import_screen
This commit is contained in:
commit
1af5cb9eaf
77 changed files with 1272 additions and 561 deletions
|
@ -1,8 +1,6 @@
|
|||
package net.osmand.router;
|
||||
|
||||
import net.osmand.Location;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.binary.RouteDataObject;
|
||||
import net.osmand.router.GeneralRouter.GeneralRouterProfile;
|
||||
import net.osmand.router.GeneralRouter.RouteAttributeContext;
|
||||
import net.osmand.router.GeneralRouter.RouteDataObjectAttribute;
|
||||
|
@ -13,9 +11,10 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.Stack;
|
||||
|
||||
public class RoutingConfiguration {
|
||||
|
@ -55,7 +54,7 @@ public class RoutingConfiguration {
|
|||
private String defaultRouter = "";
|
||||
private Map<String, GeneralRouter> routers = new LinkedHashMap<>();
|
||||
private Map<String, String> attributes = new LinkedHashMap<>();
|
||||
private HashMap<Long, Location> impassableRoadLocations = new HashMap<>();
|
||||
private Set<Long> impassableRoadLocations = new HashSet<>();
|
||||
|
||||
public Builder() {
|
||||
|
||||
|
@ -95,7 +94,7 @@ public class RoutingConfiguration {
|
|||
i.initialDirection = direction;
|
||||
i.recalculateDistance = parseSilentFloat(getAttribute(i.router, "recalculateDistanceHelp"), i.recalculateDistance) ;
|
||||
i.heuristicCoefficient = parseSilentFloat(getAttribute(i.router, "heuristicCoefficient"), i.heuristicCoefficient);
|
||||
i.router.addImpassableRoads(impassableRoadLocations.keySet());
|
||||
i.router.addImpassableRoads(new HashSet<>(impassableRoadLocations));
|
||||
i.ZOOM_TO_LOAD_TILES = parseSilentInt(getAttribute(i.router, "zoomToLoadTiles"), i.ZOOM_TO_LOAD_TILES);
|
||||
int desirable = parseSilentInt(getAttribute(i.router, "memoryLimitInMB"), 0);
|
||||
if(desirable != 0) {
|
||||
|
@ -111,16 +110,12 @@ public class RoutingConfiguration {
|
|||
return i;
|
||||
}
|
||||
|
||||
public Map<Long, Location> getImpassableRoadLocations() {
|
||||
public Set<Long> getImpassableRoadLocations() {
|
||||
return impassableRoadLocations;
|
||||
}
|
||||
|
||||
public boolean addImpassableRoad(RouteDataObject route, Location location) {
|
||||
if (!impassableRoadLocations.containsKey(route.id)){
|
||||
impassableRoadLocations.put(route.id, location);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
public boolean addImpassableRoad(long routeId) {
|
||||
return impassableRoadLocations.add(routeId);
|
||||
}
|
||||
|
||||
public Map<String, String> getAttributes() {
|
||||
|
@ -159,8 +154,8 @@ public class RoutingConfiguration {
|
|||
return routers;
|
||||
}
|
||||
|
||||
public void removeImpassableRoad(RouteDataObject obj) {
|
||||
impassableRoadLocations.remove(obj.id);
|
||||
public void removeImpassableRoad(long routeId) {
|
||||
impassableRoadLocations.remove(routeId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,8 @@ public class MapUtils {
|
|||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '_', '~'
|
||||
};
|
||||
|
||||
|
||||
|
||||
public static double getDistance(LatLon l, double latitude, double longitude) {
|
||||
return getDistance(l.getLatitude(), l.getLongitude(), latitude, longitude);
|
||||
}
|
||||
|
@ -695,39 +697,10 @@ public class MapUtils {
|
|||
return new LatLon(Math.toDegrees(phi2), Math.toDegrees(lambda2));
|
||||
}
|
||||
|
||||
public static double getVectorMagnitude(int startX, int startY, int endX, int endY) {
|
||||
return Math.sqrt(Math.pow((double) (endX - startX), 2.0) + Math.pow((double) (endY - startY), 2.0));
|
||||
public static double getSqrtDistance(int startX, int startY, int endX, int endY) {
|
||||
return Math.sqrt((endX - startX) * (endX - startX) + (endY - startY) * (endY - startY));
|
||||
}
|
||||
|
||||
//angle of vector
|
||||
public static double getAngleForRadiusVector(int startX, int startY, int endX, int endY) {
|
||||
return 2 * Math.atan((endY - startY) / (endX - startX
|
||||
+ Math.sqrt(Math.pow((double) (endX - startX), 2.0) + Math.pow((double) (endY - startY), 2.0))));
|
||||
}
|
||||
|
||||
//returns coordinates of point on circle
|
||||
public static double[] getCoordinatesFromRadiusAndAngle(double centerX, double centerY, double radius, double angle) {
|
||||
double x = centerX + radius * Math.cos(angle);
|
||||
double y = centerY + radius * Math.sin(angle);
|
||||
return new double[]{x,y};
|
||||
}
|
||||
|
||||
//returns signed angle between vectors in radians
|
||||
public static double getAngleBetweenVectors(int vectorAStartX, int vectorAStartY, int vectorAEndX, int vectorAEndY,
|
||||
int vectorBStartX, int vectorBStartY, int vectorBEndX, int vectorBEndY) {
|
||||
int[] vectorA = new int[] {getVectorAxisValue(vectorAStartX, vectorAEndX), getVectorAxisValue(vectorAStartY, vectorAEndY)};
|
||||
int[] vectorB = new int[] {getVectorAxisValue(vectorBStartX, vectorBEndX), getVectorAxisValue(vectorBStartY, vectorBEndY)};
|
||||
return Math.atan2(vectorA[0] * vectorB[1] - vectorA[1] * vectorB [0], vectorA[0] * vectorB[0] + vectorA[1] * vectorB[1]);
|
||||
}
|
||||
|
||||
//calculates vector value for axis
|
||||
public static int getVectorAxisValue(int axisStart, int axisEnd) {
|
||||
if (axisEnd < axisStart) {
|
||||
return Math.abs(axisEnd) - Math.abs(axisStart);
|
||||
} else {
|
||||
return Math.abs(axisStart) - Math.abs(axisEnd);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
40
OsmAnd/res/drawable/ic_action_recalc_angle.xml
Normal file
40
OsmAnd/res/drawable/ic_action_recalc_angle.xml
Normal file
|
@ -0,0 +1,40 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M19,20L12,16V22H12.3944C14.7454,22 17.0438,21.3041 19,20Z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:startY="16.5"
|
||||
android:startX="12"
|
||||
android:endY="24"
|
||||
android:endX="17"
|
||||
android:type="linear">
|
||||
<item android:offset="0" android:color="#FF727272"/>
|
||||
<item android:offset="1" android:color="#00727272"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:pathData="M6,12H10V14H6V12Z"
|
||||
android:strokeAlpha="0.2"
|
||||
android:fillColor="#727272"
|
||||
android:fillAlpha="0.2"/>
|
||||
<path
|
||||
android:pathData="M6,20H10V22H6V20Z"
|
||||
android:strokeAlpha="0.2"
|
||||
android:fillColor="#727272"
|
||||
android:fillAlpha="0.2"/>
|
||||
<path
|
||||
android:pathData="M10,16H6V18H10V16Z"
|
||||
android:strokeAlpha="0.2"
|
||||
android:fillColor="#727272"
|
||||
android:fillAlpha="0.2"/>
|
||||
<path
|
||||
android:pathData="M6,2V10.1487L18.9923,17.7276C19.9464,18.2841 21.171,17.9618 21.7276,17.0077C22.2841,16.0536 21.9618,14.829 21.0077,14.2724L10,7.8513V2H6ZM8,3L7,5H9L8,3ZM8,7L7,9H9L8,7ZM11.9019,12.366L10.6699,10.5L12.9019,10.634L11.9019,12.366ZM18.8301,16.366L17.5981,14.5L19.8301,14.634L18.8301,16.366ZM14.134,12.5L15.366,14.366L16.366,12.634L14.134,12.5Z"
|
||||
android:fillColor="#727272"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
|
@ -46,6 +46,7 @@
|
|||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:lineSpacingMultiplier="@dimen/text_button_line_spacing_multiplier"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_sub_text_size"
|
||||
tools:text="Some description" />
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
android:layout_gravity="fill_horizontal"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:text="@string/application_dir_description"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
android:layout_marginLeft="6dp"
|
||||
android:drawablePadding="2dp"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_color_secondary_dark"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_sub_text_size"/>
|
||||
|
||||
<TextView
|
||||
|
@ -84,7 +84,7 @@
|
|||
android:layout_gravity="bottom"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_color_secondary_dark"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_sub_text_size"/>
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
tools:text="Today"/>
|
||||
|
||||
<android.support.v7.widget.SwitchCompat
|
||||
|
@ -68,6 +69,7 @@
|
|||
android:ellipsize="end"
|
||||
android:maxLines="3"
|
||||
android:textAppearance="@style/TextAppearance.ContextMenuSubtitle"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
tools:text="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard." />
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
android:layout_marginRight="@dimen/list_content_padding_large"
|
||||
android:layout_marginTop="@dimen/list_header_padding"
|
||||
android:gravity="center"
|
||||
android:textColor="?attr/card_description_text_color"
|
||||
android:textColor="?attr/dialog_text_description_color"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
osmand:typeface="@string/font_roboto_regular"
|
||||
tools:text="@string/osm_live_payment_desc"/>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/osm_live_payment_contribute_descr"
|
||||
android:textColor="?attr/card_description_text_color"
|
||||
android:textColor="?attr/dialog_text_description_color"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
android:visibility="gone"
|
||||
osmand:typeface="@string/font_roboto_regular"
|
||||
|
@ -56,7 +56,7 @@
|
|||
android:id="@+id/description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/card_description_text_color"
|
||||
android:textColor="?attr/dialog_text_description_color"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
osmand:typeface="@string/font_roboto_regular"
|
||||
tools:text="Monthly payment" />
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/osm_live_payment_contribute_descr"
|
||||
android:textColor="?attr/card_description_text_color"
|
||||
android:textColor="?attr/dialog_text_description_color"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
android:visibility="gone"
|
||||
osmand:typeface="@string/font_roboto_regular"
|
||||
|
@ -48,7 +48,7 @@
|
|||
android:id="@+id/description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/card_description_text_color"
|
||||
android:textColor="?attr/dialog_text_description_color"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
osmand:typeface="@string/font_roboto_regular"
|
||||
tools:text="$0.62 / month • Save 68%" />
|
||||
|
|
129
OsmAnd/res/layout/recalculation_angle_dialog.xml
Normal file
129
OsmAnd/res/layout/recalculation_angle_dialog.xml
Normal file
|
@ -0,0 +1,129 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/seekbar_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/content_padding"
|
||||
android:paddingRight="@dimen/content_padding"
|
||||
android:paddingTop="@dimen/content_padding"
|
||||
android:paddingBottom="@dimen/content_padding_half">
|
||||
|
||||
<net.osmand.plus.widgets.TextViewEx
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/content_padding_small"
|
||||
android:paddingLeft="@dimen/content_padding_small"
|
||||
android:text="@string/recalc_angle_dialog_title"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
app:typeface="@string/font_roboto_medium"
|
||||
android:textSize="@dimen/default_list_text_size_large" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/content_padding_half"
|
||||
android:paddingStart="@dimen/content_padding_small"
|
||||
android:paddingLeft="@dimen/content_padding_small"
|
||||
android:paddingBottom="@dimen/content_padding"
|
||||
android:text="@string/recalc_angle_dialog_descr"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_list_text_size" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/angle_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/angle_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:paddingStart="@dimen/content_padding_small"
|
||||
android:paddingLeft="@dimen/content_padding_small"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
tools:text="@string/shared_string_angle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/angle_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end"
|
||||
android:maxLength="4"
|
||||
android:maxLines="1"
|
||||
android:paddingRight="4dp"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
tools:text="60" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/angle_units"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingEnd="@dimen/content_padding_small"
|
||||
android:paddingRight="@dimen/content_padding_small"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
tools:text="°" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/angle_seekbar_lane"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="@dimen/content_padding">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/angle_seekbar_min_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:paddingStart="@dimen/content_padding_small"
|
||||
android:paddingLeft="@dimen/content_padding_small"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
android:text="0°" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/angle_seekbar_max_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end"
|
||||
android:paddingEnd="@dimen/content_padding_small"
|
||||
android:paddingRight="@dimen/content_padding_small"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="@dimen/default_list_text_size"
|
||||
android:text="90°" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/angle_seekbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:max="90"
|
||||
android:paddingBottom="@dimen/content_padding" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
|
@ -3446,4 +3446,8 @@
|
|||
<string name="import_profile_dialog_description">يحتوي ملف التعريف المستوردة على بيانات إضافية. انقر فوق \"استيراد\" لاستيراد بيانات ملف التعريف فقط أو حدد بيانات إضافية لاستيرادها.</string>
|
||||
<string name="navigation_notification_desc">عرض إشعارات النظام أثناء التنقل بالتوجيهات .</string>
|
||||
<string name="navigation_notification">إشعار الملاحة</string>
|
||||
<string name="shared_string_app_default_w_val">التطبيق الافتراضي (%s)</string>
|
||||
<string name="no_recalculation_setting">تعطيل إعادة الحساب</string>
|
||||
<string name="route_recalculation_dist_title">الحد الأدنى من المسافة لإعادة حساب المسار</string>
|
||||
<string name="route_recalculation_dist_descr">سيتم إعادة حساب المسار إذا كانت المسافة إلى المسار أطول من المعلمة المحددة</string>
|
||||
</resources>
|
|
@ -3794,4 +3794,5 @@
|
|||
<string name="poi_bowling_alley">Bowlingcenter</string>
|
||||
<string name="poi_piste_ref">Pistenreferenznummer</string>
|
||||
<string name="poi_resort_hunting">Jagdbasis</string>
|
||||
<string name="poi_dive_centre">Tauchzentrum</string>
|
||||
</resources>
|
|
@ -3547,4 +3547,13 @@ Lon %2$s</string>
|
|||
<string name="search_offline_geo_error">Geo-Intent \'%s\' konnte nicht analysiert werden.</string>
|
||||
<string name="navigation_notification_desc">Systembenachrichtigung während der Navigation mit Navigationsanweisungen anzeigen.</string>
|
||||
<string name="navigation_notification">Navigations-Benachrichtigung</string>
|
||||
<string name="shared_string_app_default_w_val">App-Standard (%s)</string>
|
||||
<string name="no_recalculation_setting">Neuberechnung deaktivieren</string>
|
||||
<string name="route_recalculation_dist_title">Minimale Entfernung zum Neuberechnen der Route</string>
|
||||
<string name="route_recalculation_dist_descr">Die Route wird neu berechnet, wenn der Abstand zur Route länger ist als der angegebene Parameter</string>
|
||||
<string name="profile_type_custom_string">Benutzerdefiniertes Profil</string>
|
||||
<string name="shared_string_angle_param">Winkel: %s°</string>
|
||||
<string name="shared_string_angle">Winkel</string>
|
||||
<string name="recalc_angle_dialog_descr">Zusätzliches gerades Segment zwischen meinem Standort und berechneter Route wird angezeigt, bis die Route neu berechnet wird</string>
|
||||
<string name="recalc_angle_dialog_title">Minimaler Winkel zwischen meinem Standort und der Route</string>
|
||||
</resources>
|
|
@ -3523,4 +3523,8 @@ Indikas lokon: %1$s x %2$s"</string>
|
|||
<string name="index_name_antarctica">Antarkto</string>
|
||||
<string name="navigation_notification_desc">Montri sisteman sciigon dum navigi montrantan instrukciojn turno-post-turno.</string>
|
||||
<string name="navigation_notification">Sciigo dum navigado</string>
|
||||
<string name="shared_string_app_default_w_val">Implicita valoro (%s)</string>
|
||||
<string name="no_recalculation_setting">Malaktivigi rekalkulon</string>
|
||||
<string name="route_recalculation_dist_title">Minimuma distanco por rekalkuli kurson</string>
|
||||
<string name="route_recalculation_dist_descr">Kurso estos rekalkulita se la distanco estos pli granda ol tiu ĉi valoro</string>
|
||||
</resources>
|
|
@ -3798,4 +3798,5 @@
|
|||
<string name="poi_bowling_alley">Galería de bolos;Bolera</string>
|
||||
<string name="poi_piste_ref">Número de referencia de la pista</string>
|
||||
<string name="poi_resort_hunting">Base de caza</string>
|
||||
<string name="poi_dive_centre">Centro de buceo</string>
|
||||
</resources>
|
|
@ -3542,4 +3542,8 @@ Lon %2$s</string>
|
|||
<string name="index_name_antarctica">Antártida</string>
|
||||
<string name="navigation_notification_desc">Muestra la notificación del sistema durante la navegación con instrucciones de navegación.</string>
|
||||
<string name="navigation_notification">Notificación de navegación</string>
|
||||
<string name="shared_string_app_default_w_val">Aplicación predefinida (%s)</string>
|
||||
<string name="no_recalculation_setting">Desactivar el recálculo</string>
|
||||
<string name="route_recalculation_dist_title">Distancia mínima para recalcular la ruta</string>
|
||||
<string name="route_recalculation_dist_descr">La ruta será recalculada si la distancia a la ruta es mayor que el parámetro especificado</string>
|
||||
</resources>
|
|
@ -3542,4 +3542,8 @@ Lon %2$s</string>
|
|||
<string name="index_name_antarctica">Antártida</string>
|
||||
<string name="navigation_notification_desc">Muestra la notificación del sistema durante la navegación con instrucciones de navegación.</string>
|
||||
<string name="navigation_notification">Notificación de navegación</string>
|
||||
<string name="shared_string_app_default_w_val">Aplicación predefinida (%s)</string>
|
||||
<string name="no_recalculation_setting">Desactivar el recálculo</string>
|
||||
<string name="route_recalculation_dist_title">Distancia mínima para recalcular la ruta</string>
|
||||
<string name="route_recalculation_dist_descr">La ruta será recalculada si la distancia a la ruta es mayor que el parámetro especificado</string>
|
||||
</resources>
|
|
@ -2794,7 +2794,7 @@
|
|||
<string name="purchase_cancelled_dialog_title">اشتراک OsmAnd Live خود را لغو کردید</string>
|
||||
<string name="purchase_cancelled_dialog_descr">اشتراکتان را تجدید کنید تا از همهٔ قابلیتها بهرهمند شوید:</string>
|
||||
<string name="download_all">دانلود همه</string>
|
||||
<string name="open_wikipedia_link_online">بازکردن آنلاین لینک ویکیپدیا</string>
|
||||
<string name="open_wikipedia_link_online">ویکیپدیا آنلاین</string>
|
||||
<string name="open_wikipedia_link_online_description">پیوند در یک مرورگر باز میشود.</string>
|
||||
<string name="hide_full_description">نمایش توضیح کوتاه</string>
|
||||
<string name="show_full_description">نمایش توضیح کامل</string>
|
||||
|
@ -3569,4 +3569,13 @@
|
|||
<string name="accessibility_announce">اعلام</string>
|
||||
<string name="navigation_notification_desc">هنگام ناوبری راهنمای ناوبری را در اعلانها نمایش میدهد.</string>
|
||||
<string name="navigation_notification">اعلان ناوبری</string>
|
||||
<string name="shared_string_app_default_w_val">پیشفرض برنامه</string>
|
||||
<string name="no_recalculation_setting">غیرفعالسازی محاسبهٔ مجدد</string>
|
||||
<string name="route_recalculation_dist_title">مسافت کمینی برای مسیریابی مجدد</string>
|
||||
<string name="route_recalculation_dist_descr">اگر مسافت تا مسیر بیش از پارامتر تعیینشده باشد، مسیر دوباره محاسبه میشود</string>
|
||||
<string name="profile_type_custom_string">پروفایل سفارشی</string>
|
||||
<string name="shared_string_angle_param">زاویه: %s°</string>
|
||||
<string name="shared_string_angle">زاویه</string>
|
||||
<string name="recalc_angle_dialog_descr">تا مسیریابی مجدد انجام شود میان موقعیت من و مسیر محاسبهشده یک پارهخط مستقیم اضافه میشود</string>
|
||||
<string name="recalc_angle_dialog_title">کمترین زاویه میان موقعیت من و مسیر</string>
|
||||
</resources>
|
|
@ -3169,7 +3169,7 @@ représentant la zone : %1$s x %2$s</string>
|
|||
<string name="sett_generic_ext_input">Clavier</string>
|
||||
<string name="sett_wunderlinq_ext_input">WunderLINQ</string>
|
||||
<string name="sett_parrot_ext_input">Parrot</string>
|
||||
<string name="select_base_profile_dialog_message">Basez votre profil personnalisé sur l\'un des profils par défaut pour définir les unités de vitesse, de distance ou la visibilité des widgets. Voici les profils par défaut de l\'application ainsi que des exemples de profils personnalisés :</string>
|
||||
<string name="select_base_profile_dialog_message">Basez votre profil personnel sur l\'un des profils par défaut pour définir les unités de vitesse, de distance ou la visibilité des widgets. Voici les profils par défaut de l\'application ainsi que des exemples de profils personnalisés :</string>
|
||||
<string name="temporary_conditional_routing">Prendre en compte les limitations temporaires</string>
|
||||
<string name="shared_string_default">Par défaut</string>
|
||||
<string name="gpx_join_gaps">Relier les trous</string>
|
||||
|
@ -3512,4 +3512,13 @@ représentant la zone : %1$s x %2$s</string>
|
|||
<string name="index_name_antarctica">Antarctique</string>
|
||||
<string name="navigation_notification_desc">Pendant la navigation, afficher une notification système avec les directions.</string>
|
||||
<string name="navigation_notification">Notification pendant la navigation</string>
|
||||
<string name="shared_string_app_default_w_val">Par défaut pour l\'application (%s)</string>
|
||||
<string name="no_recalculation_setting">Désactiver le re-calcul</string>
|
||||
<string name="route_recalculation_dist_title">Distance à partir de laquelle recalculer l’itinéraire</string>
|
||||
<string name="route_recalculation_dist_descr">L’itinéraire sera recalculé si votre éloignement de l\'itinéraire est supérieur à ce paramètre</string>
|
||||
<string name="profile_type_custom_string">Profil personnel</string>
|
||||
<string name="shared_string_angle_param">Angle : %s°</string>
|
||||
<string name="shared_string_angle">Angle</string>
|
||||
<string name="recalc_angle_dialog_descr">Un segment supplémentaire sera affiché entre ma position et l\'itinéraire initial jusqu\'à ce que l\'itinéraire soit recalculé</string>
|
||||
<string name="recalc_angle_dialog_title">Angle minimum entre ma position et mon itinéraire</string>
|
||||
</resources>
|
|
@ -3453,4 +3453,13 @@
|
|||
<string name="please_provide_profile_name_message">נא לבחור שם לפרופיל</string>
|
||||
<string name="open_settings">פתיחת ההגדרות</string>
|
||||
<string name="plugin_disabled">התוסף מושבת</string>
|
||||
<string name="clear_recorded_data">מחיקת הנתונים שהוקלטו</string>
|
||||
<string name="copy_coordinates">העתקת נקודות ציון</string>
|
||||
<string name="plugin_disabled_descr">תוסף זה הוא יישומון נפרד, יהיה עליך להסיר אותו בנפרד אם אין לך כוונה להשתמש בו עוד.
|
||||
\n
|
||||
\nהתוסף יישאר על המכשיר גם לאחר הסרת OsmAnd.</string>
|
||||
<string name="shared_string_menu">תפריט</string>
|
||||
<string name="no_recalculation_setting">השבתת חישוב מחדש</string>
|
||||
<string name="route_recalculation_dist_title">מרחק מזערי לחישוב המסלול מחדש</string>
|
||||
<string name="route_recalculation_dist_descr">המסלול יחושב מחדש אם המרחק למסלול הוא ארוך מהמשתנה שצוין</string>
|
||||
</resources>
|
|
@ -3771,4 +3771,5 @@
|
|||
<string name="poi_piste_ref">Viðmiðunarnúmer leiðar</string>
|
||||
<string name="poi_resort_hunting">Grunnbúðir veiðimanna</string>
|
||||
<string name="poi_shop_security">Öryggisvöruverslun</string>
|
||||
<string name="poi_dive_centre">Köfunarmiðstöð</string>
|
||||
</resources>
|
|
@ -3516,4 +3516,48 @@ Stendur fyrir svæði: %1$s x %2$s</string>
|
|||
<string name="shared_string_custom_rendering_style">Sérsniðinn myndgerðaðrstíll</string>
|
||||
<string name="shared_string_include_data">Taka með viðbótargögn</string>
|
||||
<string name="index_name_antarctica">Suðurskautslandið</string>
|
||||
<string name="use_system_screen_timeout_promo">Þetta er sjálfgefið óvirkt, ef OsmAnd keyrir í forgrunni rennur skjárinn ekki út á tíma.
|
||||
\n
|
||||
\nEf þetta er virkt mun OsmAnd nota tímamörk kerfisins.</string>
|
||||
<string name="release_3_6">• Notandasnið: núna geturðu breytt röðun, stillt táknmyndir fyrir kort, breytt öllum stillingum grunnsniða og fært þær aftur á upphaflegar stillingar
|
||||
\n
|
||||
\n • Bætt við númerum afreina í leiðsögn
|
||||
\n
|
||||
\n • Endurhönnun á stillingum viðbótar
|
||||
\n
|
||||
\n • Endurhönnun á stillingaskjánum fyrir flýtiaðgengi að öllum sniðum
|
||||
\n
|
||||
\n • Bætt við valkosti til að afrita stillingar úr öðrum sniðum
|
||||
\n
|
||||
\n • Nú er hægt að breyta röðun eða fela flokka merkisstaða í leit
|
||||
\n
|
||||
\n • Rétt hliðjöfnun táknmynda merkisstaða á kortinu
|
||||
\n
|
||||
\n • Gögnum fyrir sólarupprás/sólsetur bætt við kortastillingar
|
||||
\n
|
||||
\n • Táknmyndum fyrir Heima/Vinna bætt við kortið
|
||||
\n
|
||||
\n • Bætt við stuðningi við margar línur á lýsingum stillinga
|
||||
\n
|
||||
\n • Bætt við réttum umritunum á kort af Japan
|
||||
\n
|
||||
\n • Bætt við korti fyrir Suðurskautslandið
|
||||
\n
|
||||
\n</string>
|
||||
<string name="plugin_disabled_descr">Þessi viðbót er sérstakt forrit, þú þarft að fjarlægja það sérstaklega ef þú ætlar þér ekki að nota það.
|
||||
\n
|
||||
\nViðbótin helst áfram uppsett á tækinu þó þú fjarlægir OsmAnd.</string>
|
||||
<string name="import_profile_dialog_description">Innflutta sniðið inniheldur viðbótargögn. Smelltu á að flytja inn til að sækja aðeins gögn sniðsins eða veldu þau viðbótargögn sem ætti að flytja inn.</string>
|
||||
<string name="export_profile_dialog_description">Hægt er að velja viðbótargögn til útflutnings með sniðinu.</string>
|
||||
<string name="navigation_notification_desc">Birta kerfistilkynningu með leiðbeiningum á meðan leiðsögn stendur.</string>
|
||||
<string name="navigation_notification">Tilkynning við leiðsögn</string>
|
||||
<string name="shared_string_app_default_w_val">Sjálfgefið fyrir forrit (%s)</string>
|
||||
<string name="no_recalculation_setting">Gera endurútreikning óvirkan</string>
|
||||
<string name="route_recalculation_dist_title">Lágmarksvegalengd til að leið sé endurreiknuð</string>
|
||||
<string name="route_recalculation_dist_descr">Leiðin verður endurreiknuð ef vegalengd að leiðinni er lengri en uppgefið viðfang</string>
|
||||
<string name="profile_type_custom_string">Sérsniðið notandasnið</string>
|
||||
<string name="shared_string_angle_param">Horn: %s°</string>
|
||||
<string name="shared_string_angle">Horn</string>
|
||||
<string name="recalc_angle_dialog_descr">Aukalegur beinn bútur á milli staðsetningar minnar og reiknaðrar leiðar verður sýndur þar til leiðin hefur verið endurreiknuð</string>
|
||||
<string name="recalc_angle_dialog_title">Lágmarkshorn milli staðsetningar og leiðar</string>
|
||||
</resources>
|
|
@ -2710,4 +2710,8 @@
|
|||
<string name="poi_url">URL</string>
|
||||
<string name="poi_volcano_type">Tipo</string>
|
||||
<string name="poi_volcano_status">Stato</string>
|
||||
<string name="reddit">Reddit</string>
|
||||
<string name="poi_water_tap">Rubinetto</string>
|
||||
<string name="poi_free_flying_site_takeoff">Decollo</string>
|
||||
<string name="poi_free_flying_site_landing">Atterraggio</string>
|
||||
</resources>
|
|
@ -3522,4 +3522,15 @@ Rappresenta l\'area: %1$s x %2$s</string>
|
|||
\n"</string>
|
||||
<string name="copy_coordinates">Copia le coordinate</string>
|
||||
<string name="sort_by_category">Ordina per categoria</string>
|
||||
<string name="please_provide_profile_name_message">Dai un nome a questo profilo</string>
|
||||
<string name="open_settings">Apri le impostazioni</string>
|
||||
<string name="plugin_disabled">Plugin disabilitato</string>
|
||||
<string name="plugin_disabled_descr">Questo plugin è stato aggiunto tramite un\' applicazione separata. Se non vuoi più utilizzarlo, rimuovi l\' applicazione separatamente.
|
||||
\n
|
||||
\nSe rimuovi OsmAnd, il plugin resterà sul dispositivo.</string>
|
||||
<string name="shared_string_menu">Menu</string>
|
||||
<string name="ltr_or_rtl_triple_combine_via_dash">%1$s — %2$s — %3$s</string>
|
||||
<string name="no_recalculation_setting">Disattiva ricalcolo percorso</string>
|
||||
<string name="route_recalculation_dist_title">Distanza minima per il ricalcolo del percorso</string>
|
||||
<string name="route_recalculation_dist_descr">Il percorso viene ricalcolato quando la distanza dal percorso è maggiore di quella specificata</string>
|
||||
</resources>
|
|
@ -2569,7 +2569,7 @@ POIの更新は利用できません</string>
|
|||
<string name="distance_indication_descr">アクティブマーカーまでの距離を示す情報をどこに表示するか選択してください。</string>
|
||||
<string name="active_markers_descr">マーカーの方向と距離を示すインジケーターの数を選択してください。</string>
|
||||
<string name="favourites_group">お気に入り地点のカテゴリー</string>
|
||||
<string name="empty_state_markers_active_desc">任意の場所をロングまたはショートタップで指定後、旗のボタンでマーカーを作成します。</string>
|
||||
<string name="empty_state_markers_active_desc">任意の場所をロングタップなどで指定後、旗のボタンでマーカーをつけられます。</string>
|
||||
<string name="shared_string_gpx_waypoints">経路データ内の経由地点</string>
|
||||
<string name="show_passed">通過済みも表示</string>
|
||||
<string name="hide_passed">通過済みは非表示</string>
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<string name="poi_musical_instrument">Instrumenty muzyczne</string>
|
||||
<string name="poi_newsagent">Kiosk gazetowy</string>
|
||||
<string name="poi_optician">Optyk</string>
|
||||
<string name="poi_organic">Żywność ekologiczna</string>
|
||||
<string name="poi_organic">Produkty ekologiczne</string>
|
||||
<string name="poi_outdoor">Artykuły wyposażenia zewnętrznego</string>
|
||||
<string name="poi_paint">Farby</string>
|
||||
<string name="poi_pet">Sklep zoologiczny</string>
|
||||
|
@ -3784,4 +3784,10 @@
|
|||
<string name="poi_memorial_ghost_bike">Duch roweru</string>
|
||||
<string name="poi_volcano_type_dirt">Wulkan błotny</string>
|
||||
<string name="poi_paintball">Paintball</string>
|
||||
<string name="poi_volcano_type_mud">Błotny</string>
|
||||
<string name="poi_shop_security">Sklep BHP</string>
|
||||
<string name="poi_bowling_alley">Kręgielnia</string>
|
||||
<string name="poi_piste_ref">Numer referencyjny stoku</string>
|
||||
<string name="poi_resort_hunting">Ambona łowiecka</string>
|
||||
<string name="poi_dive_centre">Centrum nurkowania</string>
|
||||
</resources>
|
|
@ -375,7 +375,7 @@
|
|||
<string name="search_offline_address">Wyszukiwanie offline</string>
|
||||
<string name="search_online_address">Wyszukiwanie online</string>
|
||||
<string name="max_level_download_tile">Maks. zoom online</string>
|
||||
<string name="max_level_download_tile_descr">Nie przeglądaj kafelków mapy online powyżej tego poziomu przybliżenia.</string>
|
||||
<string name="max_level_download_tile_descr">Nie przeglądaj map online powyżej tego poziomu przybliżenia.</string>
|
||||
<string name="route_general_information">Całkowita odległość %1$s, czas podróży %2$d h %3$d min.</string>
|
||||
<string name="router_service_descr">Usługa nawigacji online lub offline.</string>
|
||||
<string name="router_service">Usługa nawigacyjna</string>
|
||||
|
@ -443,7 +443,7 @@
|
|||
<string name="save_track_to_gpx">Automatyczne rejestrowanie śladu podczas nawigacji</string>
|
||||
<string name="update_tile">Uaktualnij mapę</string>
|
||||
<string name="reload_tile">Wczytaj ponownie kafelki</string>
|
||||
<string name="open_street_map_login_descr">Wprowadza dane uwierzytelniające wymagane do wysyłania zmian na openstreetmap.org.</string>
|
||||
<string name="open_street_map_login_descr">Potrzebny do zgłaszania do openstreetmap.org.</string>
|
||||
<string name="user_name">Nazwa użytkownika OSM</string>
|
||||
<string name="mark_point">Cel</string>
|
||||
<string name="shared_string_add_to_favorites">Dodaj do ulubionych</string>
|
||||
|
@ -460,7 +460,7 @@
|
|||
<string name="map_view_3d">Widok 3D mapy</string>
|
||||
<string name="show_poi_over_map_description">Wyświetl ostatnio wybrane użyteczne miejsca.</string>
|
||||
<string name="show_poi_over_map">Wyświetlanie użytecznych miejsc</string>
|
||||
<string name="map_tile_source_descr">Proszę wybrać zasób map kafelkowych online lub offline</string>
|
||||
<string name="map_tile_source_descr">Wybierz zasób map kafelkowych online lub offline.</string>
|
||||
<string name="map_tile_source">Zasób mapy kafelkowej</string>
|
||||
<string name="map_source">Zasób mapy</string>
|
||||
<string name="use_internet">Używanie połączenia internetowego</string>
|
||||
|
@ -485,7 +485,7 @@
|
|||
<string name="app_mode_pedestrian">Pieszo</string>
|
||||
<string name="position_on_map_center">Centralnie</string>
|
||||
<string name="position_on_map_bottom">Na dole</string>
|
||||
<string name="navigate_point_top_text">Proszę wprowadzić szerokość i długość geograficzną w wybranym formacie (D - stopnie, M - minuty, S - sekundy)</string>
|
||||
<string name="navigate_point_top_text">Wprowadź szerokość i długość geograficzną w wybranym formacie (D - stopnie, M - minuty, S - sekundy)</string>
|
||||
<string name="navigate_point_latitude">Szerokość</string>
|
||||
<string name="navigate_point_longitude">Długość</string>
|
||||
<string name="navigate_point_format_D">DDD.DDDDD</string>
|
||||
|
@ -640,7 +640,7 @@
|
|||
<string name="local_openstreetmap_delete">Usuń edycję</string>
|
||||
<string name="local_openstreetmap_descr_title">Asynchroniczna edycja OSM:</string>
|
||||
<string name="local_openstreetmap_settings">Użyteczne miejsca/uwagi OSM zapisane na urządzeniu</string>
|
||||
<string name="local_openstreetmap_settings_descr">Wyświetla i zarządza użytecznymi miejscami i uwagami OSM zapisanymi w bazie danych urządzenia.</string>
|
||||
<string name="local_openstreetmap_settings_descr">Wyświetla i zarządza użytecznymi miejscami i uwagami OSM w bazie danych urządzenia.</string>
|
||||
<string name="live_monitoring_interval_descr">Określ interwał monitorowania online.</string>
|
||||
<string name="live_monitoring_interval">Częstość wysyłania danych</string>
|
||||
<string name="live_monitoring_url_descr">Określa adres usługi internetowej przy użyciu następujących parametrów: szerokość={0}, długość={1}, znacznik czasu={2}, hdop={3}, wysokość={4}, prędkość={5}, kierunek={6}.</string>
|
||||
|
@ -779,7 +779,7 @@
|
|||
<string name="osmand_short_description_80_chars">Mapy dla całego świata i nawigacja działająca w oparciu o stacjonarne jak i sieciowe mapy OSM</string>
|
||||
<string name="osmand_long_description_1000_chars">OsmAnd (OSM Automatyczne Nawigowanie Do celu)
|
||||
\n
|
||||
\nOsmAnd jest otwarto-źródłowym programem do nawigacji z dostępem do szerokiej gamy globalnych map OpenStreetMap (OSM). Wszystkie dane map (wektorowe lub kafelkowe) mogą być przechowywane na karcie pamięci telefonu do użytku offline. OsmAnd oferuje również nawigację w trybie offline i online zawierającą zapowiedzi głosowe.
|
||||
\nOsmAnd jest otwarto-źródłowym programem do nawigacji z dostępem do szerokiej gamy globalnych map (OSM). Wszystkie dane map (wektorowe lub kafelkowe) mogą być przechowywane na karcie pamięci telefonu do użytku offline. OsmAnd oferuje również nawigację w trybie offline i online zawierającą zapowiedzi głosowe.
|
||||
\n
|
||||
\n Niektóre z podstawowych funkcji:
|
||||
\n - Funkcjonowanie w trybie offline (przechowuje pobrane mapy wektorowe lub kafelkowe w pamięci urządzenia)
|
||||
|
@ -835,7 +835,7 @@
|
|||
<string name="poi_filter_sightseeing">Zwiedzanie</string>
|
||||
<string name="osmand_plus_long_description_1000_chars">OsmAnd+ (OSM Automated Navigation Directions)
|
||||
\n
|
||||
\nOsmAnd+ jest otwarto-źródłowym programem do nawigacji z dostępem do szerokiej gamy globalnych map OpenStreetMap (OSM). Wszystkie dane map (wektorowe lub kafelkowe) mogą być przechowywane na karcie pamięci telefonu do użycia bez połączenia z siecią. OsmAnd umożliwia również wyznaczanie tras oraz nawigowanie zarówno w trybie stacjonarnym jak i sieciowym z komunikatami głosowymi.
|
||||
\nOsmAnd+ jest otwarto-źródłowym programem do nawigacji z dostępem do szerokiej gamy globalnych map OSM. Wszystkie dane map (wektorowe lub kafelkowe) mogą być przechowywane na karcie pamięci telefonu do użycia bez połączenia z siecią. OsmAnd umożliwia również wyznaczanie tras oraz nawigowanie zarówno w trybie stacjonarnym jak i sieciowym z komunikatami głosowymi.
|
||||
\n
|
||||
\nOsmAnd + to płatna wersja aplikacji, kupując ją wspierasz projekt, finansujesz rozwój nowych funkcji i otrzymujesz najnowsze aktualizacje.
|
||||
\n
|
||||
|
@ -925,7 +925,7 @@
|
|||
<string name="map_widget_av_notes">Notatki audio/video</string>
|
||||
<string name="osmand_srtm_short_description_80_chars">Wtyczka OsmAnd do rysowania poziomic offline</string>
|
||||
<string name="map_widget_distancemeasurement">Pomiar odległości</string>
|
||||
<string name="dropbox_plugin_description">Wtyczka Dropbox umożliwia synchronizację ścieżek i notatek audio/wideo z kontem Dropbox.</string>
|
||||
<string name="dropbox_plugin_description">Synchronizacja ścieżek i notatek audio/wideo z kontem Dropbox.</string>
|
||||
<string name="dropbox_plugin_name">Wtyczka Dropbox</string>
|
||||
<string name="intermediate_points_change_order">Zmień kolejność</string>
|
||||
<string name="srtm_paid_version_msg">Rozważ zakup wtyczki dodającej poziomice, aby wspomóc dalszy rozwój.</string>
|
||||
|
@ -1042,7 +1042,7 @@
|
|||
<string name="speak_traffic_warnings">Ostrzeżenia o ruchu</string>
|
||||
<string name="osb_author_dialog_password">Hasło OSM (opcjonalne)</string>
|
||||
<string name="speak_title">Zapowiadanie…</string>
|
||||
<string name="speak_descr">Konfiguruje zapowiadanie nazw ulic, ostrzeżeń o ruchu (przymusowe przystanki, progi zwalniające), fotoradarów, ograniczeń prędkości.</string>
|
||||
<string name="speak_descr">Konfiguruje zapowiadanie nazw ulic, ostrzeżeń o ruchu (przymusowe przystanki, progi zwalniające), fotoradarów i ograniczeń prędkości.</string>
|
||||
<string name="speak_street_names">Nazwy ulic (syntezowane)</string>
|
||||
<string name="driving_region_japan">Japonia</string>
|
||||
<string name="driving_region_us">Stany Zjednoczone</string>
|
||||
|
@ -1421,7 +1421,7 @@
|
|||
<string name="location_on_map">Położenie:
|
||||
Szer. %1$s
|
||||
Dł. %2$s</string>
|
||||
<string name="notes">Notatki OSM</string>
|
||||
<string name="notes">Notatki A/V</string>
|
||||
<string name="online_map">Mapa online</string>
|
||||
<string name="roads_only">Tylko drogi</string>
|
||||
<string name="free">Wolne %1$s</string>
|
||||
|
@ -2036,7 +2036,7 @@ Długość %2$s</string>
|
|||
<string name="clear_tile_data">Wyczyść wszystkie kafelki</string>
|
||||
<string name="osm_live_payment_desc">Opłata za subskrypcję na miesiąc. Anuluj ją w Google Play w dowolnym momencie.</string>
|
||||
<string name="donation_to_osm">Darowizna na rzecz społeczności OSM</string>
|
||||
<string name="donation_to_osm_desc">Część z dotacji jest przekazywana użytkownikom OSM, którzy wprowadzają zmiany na mapie OpenStreetMap. Koszt subskrypcji pozostaje taki sam.</string>
|
||||
<string name="donation_to_osm_desc">Część z dotacji jest przekazywana darczyńcom OSM. Koszt subskrypcji pozostaje taki sam.</string>
|
||||
<string name="osm_live_subscription_desc">Subskrypcje pozwalają na cogodzinne, codzienne i cotygodniowe uaktualnienia i nieograniczone liczbą pobieranie map całego świata.</string>
|
||||
<string name="driving_region_australia">Australia</string>
|
||||
<string name="lang_kab">Kabylski</string>
|
||||
|
@ -2416,11 +2416,11 @@ Reprezentuje obszar: %1$s x %2$s</string>
|
|||
<string name="keep_showing_on_map">Wyświetlanie na mapie</string>
|
||||
<string name="exit_without_saving">Zakończyć bez zapisywania?</string>
|
||||
<string name="do_not_use_animations">Wyłączenie animacji</string>
|
||||
<string name="do_not_use_animations_descr">Wyłącza animacje w aplikacji.</string>
|
||||
<string name="do_not_use_animations_descr">Wyłącza animacje mapy.</string>
|
||||
<string name="move_all_to_history">Przenieś wszystkie do historii</string>
|
||||
<string name="show_direction">Wskaźnik odległości</string>
|
||||
<string name="sort_by">Kolejność sortowania</string>
|
||||
<string name="marker_show_distance_descr">Proszę wybrać w jaki sposób wskazywać odległość i kierunek do znaczników mapy na ekranie:</string>
|
||||
<string name="marker_show_distance_descr">Wybierz w jaki sposób wskazywać odległość i kierunek do znaczników mapy:</string>
|
||||
<string name="map_orientation_change_in_accordance_with_speed">Próg zmiany orientacji mapy</string>
|
||||
<string name="map_orientation_change_in_accordance_with_speed_descr">Wybiera prędkość, poniżej której orientacja mapy zmieni się z „względem kierunku ruchu” na „względem kompasu”.</string>
|
||||
<string name="all_markers_moved_to_history">Wszystkie znaczniki mapy przeniesiono do historii</string>
|
||||
|
@ -2543,7 +2543,7 @@ Reprezentuje obszar: %1$s x %2$s</string>
|
|||
<string name="show_closed_notes">Wyświetl zamknięte uwagi</string>
|
||||
<string name="switch_osm_notes_visibility_desc">Pokaż/ukryj uwagi OSM na mapie.</string>
|
||||
<string name="gpx_file_desc">GPX - odpowiedni do eksportowania danych do JOSM i innych edytorów OSM.</string>
|
||||
<string name="osc_file_desc">OSC - odpowiedni do eksportowania danych do OpenStreetMap.</string>
|
||||
<string name="osc_file_desc">OSC - odpowiedni do eksportowania danych do OSM.</string>
|
||||
<string name="shared_string_gpx_file">Plik GPX</string>
|
||||
<string name="osc_file">Plik OSC</string>
|
||||
<string name="choose_file_type">Wybierz typ pliku</string>
|
||||
|
@ -2587,7 +2587,7 @@ Reprezentuje obszar: %1$s x %2$s</string>
|
|||
<string name="distance_farthest">Najpierw najdalsze</string>
|
||||
<string name="distance_nearest">Najpierw najbliższe</string>
|
||||
<string name="day_off_label">zamknięte</string>
|
||||
<string name="osm_edits_export_desc">Wybierz rodzaj eksportu: uwagi OSM, POI lub oba.</string>
|
||||
<string name="osm_edits_export_desc">Eksportuj jako uwagi OSM, POI lub oba.</string>
|
||||
<string name="empty_state_osm_edits_descr">Twórz lub modyfikuj OSM POI, otwórz lub skomentuj notatki OSM, oraz udostępniaj nagrane pliki GPX.</string>
|
||||
<string name="empty_state_markers_groups_desc">Importuj ulubione grupy lub punkty trasy jako znaczniki.</string>
|
||||
<string name="rendering_attr_whiteWaterSports_name">Sporty spływowe</string>
|
||||
|
@ -2772,7 +2772,7 @@ Reprezentuje obszar: %1$s x %2$s</string>
|
|||
<string name="search_no_results_feedback">Brak wyników wyszukiwania\?
|
||||
\nPrześlij opinię</string>
|
||||
<string name="commiting_way">Zatwierdzanie drogi…</string>
|
||||
<string name="osmand_plus_extended_description_part1">OsmAnd+ (Automatyczna nawigacja OSM) to aplikacja do map i nawigacji z dostępem do darmowych, światowych i wysokiej jakości danych OpenStreetMap (OSM).
|
||||
<string name="osmand_plus_extended_description_part1">OsmAnd+ (Automatyczna nawigacja OSM) to aplikacja do map i nawigacji z dostępem do darmowych, światowych i wysokiej jakości danych OSM.
|
||||
\nCiesz się nawigacją głosową i optyczną, przeglądaniem POI (punktów użyteczności publicznej), tworzeniem ścieżek GPX i zarządzaniem nimi, z wykorzystaniem wizualizacji linii konturu i wysokości, wyboru między trybem jazdy samochodem, jazdy na rowerze, poruszania się pieszo, edycji OSM i wielu innych.
|
||||
\n
|
||||
\nOsmAnd+ to płatna wersja aplikacji. Kupując ją, wspierasz projekt, finansujesz rozwój nowych funkcji i otrzymujesz najnowsze aktualizacje.
|
||||
|
@ -2861,7 +2861,7 @@ Reprezentuje obszar: %1$s x %2$s</string>
|
|||
<string name="osm_live_payment_renews_annually">Odnawia się co roku</string>
|
||||
<string name="default_price_currency_format">%1$.2f %2$s</string>
|
||||
<string name="osm_live_payment_header">Termin płatności:</string>
|
||||
<string name="osm_live_payment_contribute_descr">Darowizny pomagają finansować kartografię OpenStreetMap.</string>
|
||||
<string name="osm_live_payment_contribute_descr">Darowizny pomagają finansować kartografię OSM.</string>
|
||||
<string name="powered_by_osmand">Obsługiwane przez OsmAnd</string>
|
||||
<string name="osm_live_subscriptions">Subskrypcje</string>
|
||||
<string name="mapillary_menu_title_pano">Wyświetlaj tylko obrazy 360°</string>
|
||||
|
@ -3087,7 +3087,7 @@ Reprezentuje obszar: %1$s x %2$s</string>
|
|||
<string name="base_profile_descr_car">Samochód, ciężarówka, motocykl</string>
|
||||
<string name="base_profile_descr_bicycle">Rower górski, motorower, koń</string>
|
||||
<string name="base_profile_descr_pedestrian">Spacer, wędrówka piesza, bieganie</string>
|
||||
<string name="base_profile_descr_public_transport">Wszystkie rodzaje transportu publicznego</string>
|
||||
<string name="base_profile_descr_public_transport">Rodzaje transportu publicznego</string>
|
||||
<string name="base_profile_descr_boat">Statek, wioślarstwo, żeglarstwo</string>
|
||||
<string name="base_profile_descr_aircraft">Samolot, szybownictwo</string>
|
||||
<string name="routing_profile_geocoding">Geokodowanie</string>
|
||||
|
@ -3288,8 +3288,8 @@ Reprezentuje obszar: %1$s x %2$s</string>
|
|||
<string name="paste_Osmand_data_folder_path">Wprowadza ścieżkę do katalogu z danymi OsmAnd</string>
|
||||
<string name="change_osmand_data_folder_question">Zmienić katalog danych OsmAnd\?</string>
|
||||
<string name="move_maps_to_new_destination">Przenieś do nowej lokalizacji</string>
|
||||
<string name="internal_app_storage_description">Wewnętrzna pamięć, ukryta przed użytkownikiem i innymi aplikacjami, do której dostęp ma tylko OsmAnd</string>
|
||||
<string name="change_data_storage_folder">Wybór katalogu przechowywania danych</string>
|
||||
<string name="internal_app_storage_description">Wewnętrzna pamięć dla OsmAnd (ukryta przed użytkownikami i innymi aplikacjami).</string>
|
||||
<string name="change_data_storage_folder">Wybór katalogu przechowywania</string>
|
||||
<string name="rendering_attr_piste_type_snow_park_name">Park terenowy</string>
|
||||
<string name="rendering_attr_piste_type_sleigh_name">Sanie</string>
|
||||
<string name="rendering_attr_piste_type_sled_name">Sanki</string>
|
||||
|
@ -3355,7 +3355,7 @@ Reprezentuje obszar: %1$s x %2$s</string>
|
|||
\n • Inne poprawki błędów
|
||||
\n
|
||||
\n</string>
|
||||
<string name="apply_preference_to_all_profiles">Można wprowadzić tę zmianę we wszystkich profilach lub tylko w obecnie wybranym.</string>
|
||||
<string name="apply_preference_to_all_profiles">Można wprowadzić tę zmianę tylko w obecnie wybranym profilu.</string>
|
||||
<string name="routing_attr_driving_style_prefer_unpaved_name">Preferowanie nieutwardzonych dróg</string>
|
||||
<string name="routing_attr_driving_style_prefer_unpaved_description">Preferuje drogi nieutwardzone.</string>
|
||||
<string name="layer_osm_edits">Zmiany OSM</string>
|
||||
|
@ -3367,21 +3367,21 @@ Reprezentuje obszar: %1$s x %2$s</string>
|
|||
<string name="quick_action_hillshade_hide">Ukryj cieniowanie terenu</string>
|
||||
<string name="quick_action_show_hide_hillshade">Przełącz widoczność cieniowania terenu</string>
|
||||
<string name="quick_action_hillshade_descr">Przełącza wyświetlanie cieniowania terenu na mapie.</string>
|
||||
<string name="tts_initialization_error">Nie można uruchomić mechanizmu zamiany tekstu na mowę</string>
|
||||
<string name="tts_initialization_error">Nie można uruchomić mechanizmu zamiany tekstu na mowę.</string>
|
||||
<string name="shared_preference">Wspólne</string>
|
||||
<string name="simulate_your_location_gpx_descr">Symuluje położenie używając zarejestrowanego śladu GPX.</string>
|
||||
<string name="export_profile">Eksportuj profil</string>
|
||||
<string name="exported_osmand_profile">Profil OsmAnd: %1$s</string>
|
||||
<string name="overwrite_profile_q">Profil „%1$s” już istnieje. Zastąpić go\?</string>
|
||||
<string name="overwrite_profile_q">„%1$s” już istnieje. Zastąpić go\?</string>
|
||||
<string name="export_profile_failed">Nie udało się wyeksportować profilu.</string>
|
||||
<string name="profile_import">Import profilu</string>
|
||||
<string name="profile_import_descr">Aby zaimportować profil, proszę otworzyć plik na urządzeniu za pomocą OsmAnd.</string>
|
||||
<string name="profile_import_descr">Dodaj profil otwierając jego plik w OsmAnd.</string>
|
||||
<string name="file_import_error">Błąd importowania %1$s: %2$s</string>
|
||||
<string name="file_imported_successfully">Zaimportowano %1$s.</string>
|
||||
<string name="rendering_value_white_name">Biały</string>
|
||||
<string name="swap_two_places">Zamień %1$s i %2$s</string>
|
||||
<string name="route_start_point">Początek trasy</string>
|
||||
<string name="default_speed_dialog_msg">Służy do szacowania czasu przyjazdu dla nieznanego rodzaju dróg i ograniczenia prędkości na wszystkich drogach (może zmienić trasę)</string>
|
||||
<string name="default_speed_dialog_msg">Szacuje czas przyjazdu dla nieznanego rodzaju dróg i ograniczenia prędkości na wszystkich drogach (może zmienić trasę)</string>
|
||||
<string name="swap_start_and_destination">Odwróć początek i cel</string>
|
||||
<string name="track_saved">Zapisano ślad</string>
|
||||
<string name="empty_filename">Nazwa pliku jest pusta</string>
|
||||
|
@ -3393,11 +3393,11 @@ Reprezentuje obszar: %1$s x %2$s</string>
|
|||
<string name="suggested_maps">Sugerowane mapy</string>
|
||||
<string name="suggested_maps_descr">Te mapy są wymagane do użycia z wtyczką</string>
|
||||
<string name="added_profiles">Dodano profile</string>
|
||||
<string name="added_profiles_descr">Wtyczka dodaje nowy profil do programu</string>
|
||||
<string name="added_profiles_descr">Profile dodane przez wtyczkę</string>
|
||||
<string name="shared_string_turn_off">Wyłącz</string>
|
||||
<string name="new_plugin_added">Dodano nową wtyczkę</string>
|
||||
<string name="dialogs_and_notifications_descr">Kontroluj wyskakujące okienka, okna dialogowe i powiadomienia, które OsmAnd pokazuje podczas użytkowania.</string>
|
||||
<string name="join_segments">Dołącz segmenty</string>
|
||||
<string name="dialogs_and_notifications_descr">Kontroluj wyskakujące okienka, okna dialogowe i powiadomienia.</string>
|
||||
<string name="join_segments">Połącz segmenty</string>
|
||||
<string name="rendering_value_walkingRoutesOSMCNodes_name">Sieci węzłów</string>
|
||||
<string name="add_new_profile_q">Dodać nowy profil \'%1$s\'\?</string>
|
||||
<string name="save_heading">Dołącz kierunek</string>
|
||||
|
@ -3406,24 +3406,24 @@ Reprezentuje obszar: %1$s x %2$s</string>
|
|||
<string name="street_city">%1$s, %2$s</string>
|
||||
<string name="personal_category_name">Osobiste</string>
|
||||
<string name="shared_string_downloading_formatted">Pobieranie %s</string>
|
||||
<string name="desert_render_descr">Dla pustyń i innych słabo zaludnionych obszarów.</string>
|
||||
<string name="rendering_attr_showCycleNodeNetworkRoutes_name">Pokaż trasy cyklu sieci węzłów</string>
|
||||
<string name="desert_render_descr">Dla pustyń i innych słabo zaludnionych obszarów. Bardziej szczegółowa.</string>
|
||||
<string name="rendering_attr_showCycleNodeNetworkRoutes_name">Pokaż punkt sieci tras rowerowych</string>
|
||||
<string name="rendering_value_thick_name">Gruby</string>
|
||||
<string name="select_navigation_icon">Wybierz ikonę nawigacji</string>
|
||||
<string name="select_navigation_icon">Ikona położenia podczas ruchu</string>
|
||||
<string name="select_map_icon">Wybierz ikonę mapy</string>
|
||||
<string name="delete_profiles_descr">Po dotknięciu Zastosuj usunięte profile zostaną całkowicie utracone.</string>
|
||||
<string name="master_profile">Główny profil</string>
|
||||
<string name="select_color">Wybierz kolor</string>
|
||||
<string name="edit_profiles_descr">Nie możesz usunąć domyślnych profili OsmAnd, ale możesz je wyłączyć na poprzednim ekranie lub przenieść na dół.</string>
|
||||
<string name="edit_profiles_descr">Nie można usunąć domyślnych profili OsmAnd, ale można je wyłączyć (na poprzednim ekranie) lub przenieść na dół.</string>
|
||||
<string name="edit_profiles">Edytuj profile</string>
|
||||
<string name="select_nav_profile_dialog_message">Typ nawigacji wpływa na zasady obliczania trasy.</string>
|
||||
<string name="select_nav_profile_dialog_message">\"Typ nawigacji\" określa jak obliczane są trasy.</string>
|
||||
<string name="profile_appearance">Wygląd profilu</string>
|
||||
<string name="choose_icon_color_name">Wybierz ikonę, kolor i nazwę</string>
|
||||
<string name="choose_icon_color_name">Ikona, kolor i nazwa</string>
|
||||
<string name="reorder_profiles">Edytuj listę profili</string>
|
||||
<string name="selected_profile">Wybierz profil</string>
|
||||
<string name="selected_profile">Wybrany profil</string>
|
||||
<string name="reset_confirmation_descr">Stuknięcie %1$s spowoduje utratę wszystkich zmian.</string>
|
||||
<string name="reset_all_profile_settings_descr">Wszystkie ustawienia profilu zostaną przywrócone do stanu po instalacji.</string>
|
||||
<string name="reset_all_profile_settings">Czy zresetować wszystkie ustawienia profilu do wartości domyślnych\?</string>
|
||||
<string name="reset_all_profile_settings">Zresetować wszystkie ustawienia profilu\?</string>
|
||||
<string name="ltr_or_rtl_combine_via_colon">%1$s: %2$s</string>
|
||||
<string name="button_rate">Oceń</string>
|
||||
<string name="ltr_or_rtl_combine_via_space">%1$s %2$s</string>
|
||||
|
@ -3517,4 +3517,19 @@ Reprezentuje obszar: %1$s x %2$s</string>
|
|||
<string name="shared_string_include_data">Uwzględnij dodatkowe dane</string>
|
||||
<string name="import_profile_dialog_description">Zaimportowany profil zawiera dodatkowe dane. Kliknij przycisk Importuj, aby zaimportować tylko dane profilu lub wybierz dodatkowe dane do zaimportowania.</string>
|
||||
<string name="export_profile_dialog_description">Możesz wybrać dodatkowe dane do wyeksportowania wraz z profilem.</string>
|
||||
<string name="routing_profile_direct_to">Bezpośrednio do punktu</string>
|
||||
<string name="navigation_notification_desc">Pokaż powiadomienia systemowe podczas nawigacji z instrukcjami nawigacji.</string>
|
||||
<string name="navigation_notification">Powiadomienie nawigacyjne</string>
|
||||
<string name="shared_string_app_default_w_val">Aplikacja domyślna (%s)</string>
|
||||
<string name="no_recalculation_setting">Wyłącz ponowne obliczanie</string>
|
||||
<string name="route_recalculation_dist_title">Minimalna odległość do ponownego obliczenia trasy</string>
|
||||
<string name="route_recalculation_dist_descr">Trasa zostanie ponownie obliczona, jeśli odległość trasy jest dłuższa niż określony parametr</string>
|
||||
<string name="tracks_view_descr">Twoje nagrane ślady są w %1$s lub w folderze OsmAnd.</string>
|
||||
<string name="use_system_screen_timeout_promo">Domyślnie wyłączone, jeśli OsmAnd jest włączony na pierwszym planie, ekran nie będzie się wygaszał.
|
||||
\n
|
||||
\nJeśli włączone, OsmAnd będzie używał systemowych ustawień wygaszania.</string>
|
||||
<string name="sort_by_category">Sortuj wg kategorii</string>
|
||||
<string name="shared_string_menu">Menu</string>
|
||||
<string name="shared_string_routing">Wyznaczanie trasy</string>
|
||||
<string name="index_name_antarctica">Antarktyda</string>
|
||||
</resources>
|
|
@ -3527,4 +3527,10 @@ Pôr do Sol: %2$s</string>
|
|||
<string name="import_profile_dialog_description">O perfil importado contém dados adicionais. Clique em Importar para importar apenas dados do perfil ou selecione dados adicionais a serem importados.</string>
|
||||
<string name="export_profile_dialog_description">Você pode selecionar dados adicionais para exportar junto com o perfil.</string>
|
||||
<string name="index_name_antarctica">Antártida</string>
|
||||
<string name="navigation_notification_desc">Mostrar notificação do sistema durante a navegação com instruções de navegação.</string>
|
||||
<string name="navigation_notification">Notificação de navegação</string>
|
||||
<string name="shared_string_app_default_w_val">Aplicativo padrão (%s)</string>
|
||||
<string name="no_recalculation_setting">Desativar recálculo</string>
|
||||
<string name="route_recalculation_dist_title">Distância mínima para recalcular a rota</string>
|
||||
<string name="route_recalculation_dist_descr">A rota será recalculada se a distância até a rota for maior que o parâmetro especificado</string>
|
||||
</resources>
|
|
@ -787,7 +787,7 @@
|
|||
<string name="poi_transport_construction">Fràigu de mèdios de trasportu</string>
|
||||
<string name="poi_coffee">Tzilleri (cafè)</string>
|
||||
<string name="poi_doors">Ghennas</string>
|
||||
<string name="poi_scuba_diving_shop">Artìculos pro immersiones</string>
|
||||
<string name="poi_scuba_diving_shop">Artìculos pro imbèrghidas in s\'abba</string>
|
||||
<string name="poi_energy">Cummèrtziu de energia</string>
|
||||
<string name="poi_perfumery">Butega de profumos</string>
|
||||
<string name="poi_ford_stepping_stones">Ponte de perdas</string>
|
||||
|
@ -3789,4 +3789,5 @@
|
|||
<string name="poi_bowling_alley">Tzentru pro su bowling</string>
|
||||
<string name="poi_piste_ref">Nùmeru de referèntzia de sa pista</string>
|
||||
<string name="poi_resort_hunting">Base pro sa cassa</string>
|
||||
<string name="poi_dive_centre">Tzentru pro sas imbèrghidas in s\'abba</string>
|
||||
</resources>
|
|
@ -3540,4 +3540,8 @@ Pro praghere iscrie su còdighe intreu</string>
|
|||
<string name="index_name_antarctica">Antàrticu</string>
|
||||
<string name="navigation_notification_desc">Ammustra notìficas de sistema durante sa navigatzione cun istrutziones de navigatzione.</string>
|
||||
<string name="navigation_notification">Notìfica de navigatzione</string>
|
||||
<string name="shared_string_app_default_w_val">Predefinidu in s\'aplicatzione (%s)</string>
|
||||
<string name="no_recalculation_setting">Disabìlita su ri-càlculu de s\'àndala</string>
|
||||
<string name="route_recalculation_dist_title">Distàntzia mìnima pro torrare a calculare s\'àndala</string>
|
||||
<string name="route_recalculation_dist_descr">S\'àndala at a bènnere calculada torra si sa distàntzia dae s\'àndala est prus manna de cussa dislindada</string>
|
||||
</resources>
|
|
@ -3497,4 +3497,13 @@
|
|||
<string name="index_name_antarctica">Antarktika</string>
|
||||
<string name="navigation_notification_desc">Navigasyon talimatları ile navigasyon sırasında sistem bildirimini göster.</string>
|
||||
<string name="navigation_notification">Navigasyon bildirimi</string>
|
||||
<string name="shared_string_app_default_w_val">Uygulama Varsayılanı (%s)</string>
|
||||
<string name="no_recalculation_setting">Yeniden hesaplamayı devre dışı bırak</string>
|
||||
<string name="route_recalculation_dist_title">Rotayı yeniden hesaplamak için minimum mesafe</string>
|
||||
<string name="route_recalculation_dist_descr">Rotaya olan mesafe belirtilen parametreden daha uzunsa rota yeniden hesaplanacak</string>
|
||||
<string name="profile_type_custom_string">Özel profil</string>
|
||||
<string name="shared_string_angle_param">Açı: %s°</string>
|
||||
<string name="shared_string_angle">Açı</string>
|
||||
<string name="recalc_angle_dialog_descr">Konumum ve hesaplanan rota arasındaki ekstra düz segment, rota yeniden hesaplanıncaya kadar görüntülenecek</string>
|
||||
<string name="recalc_angle_dialog_title">Konumum ve rota arasındaki minimum açı</string>
|
||||
</resources>
|
File diff suppressed because it is too large
Load diff
|
@ -3532,4 +3532,13 @@
|
|||
<string name="index_name_antarctica">Антарктида</string>
|
||||
<string name="navigation_notification_desc">Показувати системне сповіщення з навігаційними вказівками під час навігації.</string>
|
||||
<string name="navigation_notification">Навігаційне сповіщення</string>
|
||||
<string name="shared_string_app_default_w_val">Усталений застосунок (%s)</string>
|
||||
<string name="no_recalculation_setting">Вимкнути перерахунок</string>
|
||||
<string name="route_recalculation_dist_title">Найменша відстань для перерахунку маршруту</string>
|
||||
<string name="route_recalculation_dist_descr">Маршрут буде перераховано, якщо відстань до нього перевищує вказане</string>
|
||||
<string name="profile_type_custom_string">Користувацький профіль</string>
|
||||
<string name="shared_string_angle_param">Кут: %s°</string>
|
||||
<string name="shared_string_angle">Кут</string>
|
||||
<string name="recalc_angle_dialog_descr">Додатковий прямий відрізок між моїм розташуванням та розрахунковим маршрутом відображатиметься, поки маршрут не буде перераховано</string>
|
||||
<string name="recalc_angle_dialog_title">Найменший кут між моїм розташуванням та маршрутом</string>
|
||||
</resources>
|
|
@ -3790,4 +3790,5 @@
|
|||
<string name="poi_bowling_alley">保齡球館</string>
|
||||
<string name="poi_piste_ref">滑雪道參考編號</string>
|
||||
<string name="poi_resort_hunting">狩獵基地</string>
|
||||
<string name="poi_dive_centre">水肺潛水中心</string>
|
||||
</resources>
|
|
@ -3532,4 +3532,8 @@
|
|||
<string name="index_name_antarctica">南極洲</string>
|
||||
<string name="navigation_notification_desc">使用導航說明時喜訕系統通知。</string>
|
||||
<string name="navigation_notification">導航通知</string>
|
||||
<string name="shared_string_app_default_w_val">應用程式預設值 (%s)</string>
|
||||
<string name="no_recalculation_setting">停用重新計算</string>
|
||||
<string name="route_recalculation_dist_title">重新計算路線的最小距離</string>
|
||||
<string name="route_recalculation_dist_descr">如果到路線的距離大於指定的參數,則路線將會重新計算</string>
|
||||
</resources>
|
|
@ -11,6 +11,11 @@
|
|||
Thx - Hardy
|
||||
|
||||
-->
|
||||
<string name="profile_type_custom_string">Custom profile</string>
|
||||
<string name="shared_string_angle_param">Angle: %s°</string>
|
||||
<string name="shared_string_angle">Angle</string>
|
||||
<string name="recalc_angle_dialog_descr">Extra straight segment between my location and calculated route will be displayed until the route is recalculated</string>
|
||||
<string name="recalc_angle_dialog_title">Minimum angle between my location and route</string>
|
||||
<string name="navigation_notification_desc">Show system notification while navigation with navigation instructions.</string>
|
||||
<string name="navigation_notification">Navigation notification</string>
|
||||
<string name="shared_string_app_default_w_val">App Default (%s)</string>
|
||||
|
|
|
@ -28,7 +28,6 @@ import android.support.annotation.AttrRes;
|
|||
import android.support.annotation.ColorInt;
|
||||
import android.support.annotation.ColorRes;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import android.support.v4.text.TextUtilsCompat;
|
||||
|
@ -342,18 +341,6 @@ public class AndroidUtils {
|
|||
return res;
|
||||
}
|
||||
|
||||
public static void setSnackbarTextColor(Snackbar snackbar, @ColorRes int colorId) {
|
||||
View view = snackbar.getView();
|
||||
TextView tv = (TextView) view.findViewById(android.support.design.R.id.snackbar_action);
|
||||
tv.setTextColor(ContextCompat.getColor(view.getContext(), colorId));
|
||||
}
|
||||
|
||||
public static void setSnackbarTextMaxLines(Snackbar snackbar, int maxLines) {
|
||||
View view = snackbar.getView();
|
||||
TextView tv = (TextView) view.findViewById(android.support.design.R.id.snackbar_text);
|
||||
tv.setMaxLines(maxLines);
|
||||
}
|
||||
|
||||
public static void setBackground(Context ctx, View view, boolean night, int lightResId, int darkResId) {
|
||||
Drawable drawable;
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
|
||||
|
|
|
@ -631,6 +631,7 @@ public class AppInitializer implements IProgress {
|
|||
if (!customConfigs.isEmpty()) {
|
||||
app.getCustomRoutingConfigs().putAll(customConfigs);
|
||||
}
|
||||
app.avoidSpecificRoads.initRouteObjects(false);
|
||||
callback.onRoutingFilesLoaded();
|
||||
}
|
||||
|
||||
|
@ -741,7 +742,6 @@ public class AppInitializer implements IProgress {
|
|||
notifyEvent(InitEvents.RESTORE_BACKUPS);
|
||||
app.mapMarkersHelper.syncAllGroupsAsync();
|
||||
app.searchUICore.initSearchUICore();
|
||||
app.avoidSpecificRoads.initRouteObjects();
|
||||
|
||||
checkLiveUpdatesAlerts();
|
||||
|
||||
|
|
|
@ -420,6 +420,14 @@ public class ApplicationMode {
|
|||
app.getSettings().MAX_SPEED.setModeValue(this, defaultSpeed);
|
||||
}
|
||||
|
||||
public float getStrAngle() {
|
||||
return app.getSettings().ROUTE_STRAIGHT_ANGLE.getModeValue(this);
|
||||
}
|
||||
|
||||
public void setStrAngle(float angle) {
|
||||
app.getSettings().ROUTE_STRAIGHT_ANGLE.setModeValue(this, angle);
|
||||
}
|
||||
|
||||
public String getUserProfileName() {
|
||||
return app.getSettings().USER_PROFILE_NAME.getModeValue(this);
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ import net.osmand.plus.api.SettingsAPI;
|
|||
import net.osmand.plus.api.SettingsAPI.SettingsEditor;
|
||||
import net.osmand.plus.api.SettingsAPIImpl;
|
||||
import net.osmand.plus.dialogs.RateUsBottomSheetDialogFragment;
|
||||
import net.osmand.plus.helpers.AvoidSpecificRoads.AvoidRoadInfo;
|
||||
import net.osmand.plus.helpers.SearchHistoryHelper;
|
||||
import net.osmand.plus.mapillary.MapillaryPlugin;
|
||||
import net.osmand.plus.mapmarkers.CoordinateInputFormats.Format;
|
||||
|
@ -2627,6 +2628,8 @@ public class OsmandSettings {
|
|||
|
||||
private static final String IMPASSABLE_ROAD_POINTS = "impassable_road_points";
|
||||
private static final String IMPASSABLE_ROADS_DESCRIPTIONS = "impassable_roads_descriptions";
|
||||
private static final String IMPASSABLE_ROADS_IDS = "impassable_roads_ids";
|
||||
private static final String IMPASSABLE_ROADS_APP_MODE_KEYS = "impassable_roads_app_mode_keys";
|
||||
private ImpassableRoadsStorage mImpassableRoadsStorage = new ImpassableRoadsStorage();
|
||||
|
||||
public void backupPointToStart() {
|
||||
|
@ -2796,9 +2799,184 @@ public class OsmandSettings {
|
|||
}
|
||||
|
||||
private class ImpassableRoadsStorage extends MapPointsStorage {
|
||||
|
||||
protected String roadsIdsKey;
|
||||
protected String appModeKey;
|
||||
|
||||
public ImpassableRoadsStorage() {
|
||||
pointsKey = IMPASSABLE_ROAD_POINTS;
|
||||
descriptionsKey = IMPASSABLE_ROADS_DESCRIPTIONS;
|
||||
roadsIdsKey = IMPASSABLE_ROADS_IDS;
|
||||
appModeKey = IMPASSABLE_ROADS_APP_MODE_KEYS;
|
||||
}
|
||||
|
||||
public List<Long> getRoadIds(int size) {
|
||||
List<Long> list = new ArrayList<>();
|
||||
String roadIds = settingsAPI.getString(globalPreferences, roadsIdsKey, "");
|
||||
if (roadIds.trim().length() > 0) {
|
||||
StringTokenizer tok = new StringTokenizer(roadIds, ",");
|
||||
while (tok.hasMoreTokens() && list.size() <= size) {
|
||||
list.add(Long.parseLong(tok.nextToken()));
|
||||
}
|
||||
}
|
||||
while (list.size() < size) {
|
||||
list.add(0L);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<String> getAppModeKeys(int size) {
|
||||
List<String> list = new ArrayList<>();
|
||||
String roadIds = settingsAPI.getString(globalPreferences, appModeKey, "");
|
||||
if (roadIds.trim().length() > 0) {
|
||||
StringTokenizer tok = new StringTokenizer(roadIds, ",");
|
||||
while (tok.hasMoreTokens() && list.size() <= size) {
|
||||
list.add(tok.nextToken());
|
||||
}
|
||||
}
|
||||
while (list.size() < size) {
|
||||
list.add("");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<AvoidRoadInfo> getImpassableRoadsInfo() {
|
||||
List<LatLon> points = getPoints();
|
||||
List<Long> roadIds = getRoadIds(points.size());
|
||||
List<String> appModeKeys = getAppModeKeys(points.size());
|
||||
List<String> descriptions = getPointDescriptions(points.size());
|
||||
|
||||
List<AvoidRoadInfo> avoidRoadsInfo = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < points.size(); i++) {
|
||||
LatLon latLon = points.get(i);
|
||||
PointDescription description = PointDescription.deserializeFromString(descriptions.get(i), null);
|
||||
|
||||
AvoidRoadInfo avoidRoadInfo = new AvoidRoadInfo();
|
||||
avoidRoadInfo.id = roadIds.get(i);
|
||||
avoidRoadInfo.latitude = latLon.getLatitude();
|
||||
avoidRoadInfo.longitude = latLon.getLongitude();
|
||||
avoidRoadInfo.name = description.getName();
|
||||
avoidRoadInfo.appModeKey = appModeKeys.get(i);
|
||||
avoidRoadsInfo.add(avoidRoadInfo);
|
||||
}
|
||||
|
||||
return avoidRoadsInfo;
|
||||
}
|
||||
|
||||
public boolean addImpassableRoadInfo(AvoidRoadInfo avoidRoadInfo) {
|
||||
List<LatLon> points = getPoints();
|
||||
List<Long> roadIds = getRoadIds(points.size());
|
||||
List<String> appModeKeys = getAppModeKeys(points.size());
|
||||
List<String> descriptions = getPointDescriptions(points.size());
|
||||
|
||||
roadIds.add(0, avoidRoadInfo.id);
|
||||
points.add(0, new LatLon(avoidRoadInfo.latitude, avoidRoadInfo.longitude));
|
||||
appModeKeys.add(0, avoidRoadInfo.appModeKey);
|
||||
descriptions.add(0, PointDescription.serializeToString(new PointDescription("", avoidRoadInfo.name)));
|
||||
|
||||
return saveAvoidRoadData(points, descriptions, roadIds, appModeKeys);
|
||||
}
|
||||
|
||||
public boolean updateImpassableRoadInfo(AvoidRoadInfo avoidRoadInfo) {
|
||||
List<LatLon> points = getPoints();
|
||||
|
||||
int index = points.indexOf(new LatLon(avoidRoadInfo.latitude, avoidRoadInfo.longitude));
|
||||
if (index != -1) {
|
||||
List<Long> roadIds = getRoadIds(points.size());
|
||||
List<String> appModeKeys = getAppModeKeys(points.size());
|
||||
List<String> descriptions = getPointDescriptions(points.size());
|
||||
|
||||
roadIds.set(index, avoidRoadInfo.id);
|
||||
appModeKeys.set(index, avoidRoadInfo.appModeKey);
|
||||
descriptions.set(index, PointDescription.serializeToString(new PointDescription("", avoidRoadInfo.name)));
|
||||
return saveAvoidRoadData(points, descriptions, roadIds, appModeKeys);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deletePoint(int index) {
|
||||
List<LatLon> points = getPoints();
|
||||
List<Long> roadIds = getRoadIds(points.size());
|
||||
List<String> appModeKeys = getAppModeKeys(points.size());
|
||||
List<String> descriptions = getPointDescriptions(points.size());
|
||||
|
||||
if (index < points.size()) {
|
||||
points.remove(index);
|
||||
roadIds.remove(index);
|
||||
appModeKeys.remove(index);
|
||||
descriptions.remove(index);
|
||||
return saveAvoidRoadData(points, descriptions, roadIds, appModeKeys);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deletePoint(LatLon latLon) {
|
||||
List<LatLon> points = getPoints();
|
||||
List<Long> roadIds = getRoadIds(points.size());
|
||||
List<String> appModeKeys = getAppModeKeys(points.size());
|
||||
List<String> descriptions = getPointDescriptions(points.size());
|
||||
|
||||
int index = points.indexOf(latLon);
|
||||
if (index != -1) {
|
||||
points.remove(index);
|
||||
roadIds.remove(index);
|
||||
appModeKeys.remove(index);
|
||||
descriptions.remove(index);
|
||||
return saveAvoidRoadData(points, descriptions, roadIds, appModeKeys);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean movePoint(LatLon latLonEx, LatLon latLonNew) {
|
||||
List<LatLon> points = getPoints();
|
||||
List<Long> roadIds = getRoadIds(points.size());
|
||||
List<String> appModeKeys = getAppModeKeys(points.size());
|
||||
List<String> descriptions = getPointDescriptions(points.size());
|
||||
|
||||
int i = points.indexOf(latLonEx);
|
||||
if (i != -1) {
|
||||
points.set(i, latLonNew);
|
||||
return saveAvoidRoadData(points, descriptions, roadIds, appModeKeys);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean saveAvoidRoadData(List<LatLon> points, List<String> descriptions,
|
||||
List<Long> roadIds, List<String> appModeKeys) {
|
||||
return savePoints(points, descriptions) && saveRoadIds(roadIds) && saveAppModeKeys(appModeKeys);
|
||||
}
|
||||
|
||||
public boolean saveRoadIds(List<Long> roadIds) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
Iterator<Long> iterator = roadIds.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
stringBuilder.append(iterator.next());
|
||||
if (iterator.hasNext()) {
|
||||
stringBuilder.append(",");
|
||||
}
|
||||
}
|
||||
return settingsAPI.edit(globalPreferences)
|
||||
.putString(roadsIdsKey, stringBuilder.toString())
|
||||
.commit();
|
||||
}
|
||||
|
||||
public boolean saveAppModeKeys(List<String> appModeKeys) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
Iterator<String> iterator = appModeKeys.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
stringBuilder.append(iterator.next());
|
||||
if (iterator.hasNext()) {
|
||||
stringBuilder.append(",");
|
||||
}
|
||||
}
|
||||
return settingsAPI.edit(globalPreferences)
|
||||
.putString(appModeKey, stringBuilder.toString())
|
||||
.commit();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2989,11 +3167,16 @@ public class OsmandSettings {
|
|||
return settingsAPI.edit(globalPreferences).putInt(POINT_NAVIGATE_ROUTE, NAVIGATE).commit();
|
||||
}
|
||||
|
||||
public List<LatLon> getImpassableRoadPoints() {
|
||||
return mImpassableRoadsStorage.getPoints();
|
||||
public List<AvoidRoadInfo> getImpassableRoadPoints() {
|
||||
return mImpassableRoadsStorage.getImpassableRoadsInfo();
|
||||
}
|
||||
public boolean addImpassableRoad(double latitude, double longitude) {
|
||||
return mImpassableRoadsStorage.insertPoint(latitude, longitude, null, 0);
|
||||
|
||||
public boolean addImpassableRoad(AvoidRoadInfo avoidRoadInfo) {
|
||||
return mImpassableRoadsStorage.addImpassableRoadInfo(avoidRoadInfo);
|
||||
}
|
||||
|
||||
public boolean updateImpassableRoadInfo(AvoidRoadInfo avoidRoadInfo) {
|
||||
return mImpassableRoadsStorage.updateImpassableRoadInfo(avoidRoadInfo);
|
||||
}
|
||||
|
||||
public boolean removeImpassableRoad(int index) {
|
||||
|
|
|
@ -15,6 +15,7 @@ import android.support.annotation.ColorInt;
|
|||
import android.support.annotation.ColorRes;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.StringRes;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.graphics.drawable.DrawableCompat;
|
||||
import android.support.v4.text.TextUtilsCompat;
|
||||
|
@ -344,6 +345,40 @@ public class UiUtilities {
|
|||
return screenOrientation;
|
||||
}
|
||||
|
||||
public static void setupSnackbar(Snackbar snackbar, boolean nightMode) {
|
||||
setupSnackbar(snackbar, nightMode, null, null, null, null);
|
||||
}
|
||||
|
||||
public static void setupSnackbar(Snackbar snackbar, boolean nightMode, Integer maxLines) {
|
||||
setupSnackbar(snackbar, nightMode, null, null, null, maxLines);
|
||||
}
|
||||
|
||||
public static void setupSnackbar(Snackbar snackbar, boolean nightMode, @ColorRes Integer backgroundColor,
|
||||
@ColorRes Integer messageColor, @ColorRes Integer actionColor, Integer maxLines) {
|
||||
if (snackbar == null) {
|
||||
return;
|
||||
}
|
||||
View view = snackbar.getView();
|
||||
Context ctx = view.getContext();
|
||||
TextView tvMessage = (TextView) view.findViewById(android.support.design.R.id.snackbar_text);
|
||||
TextView tvAction = (TextView) view.findViewById(android.support.design.R.id.snackbar_action);
|
||||
if (messageColor == null) {
|
||||
messageColor = nightMode ? R.color.text_color_primary_dark : R.color.text_color_primary_light;
|
||||
}
|
||||
tvMessage.setTextColor(ContextCompat.getColor(ctx, messageColor));
|
||||
if (actionColor == null) {
|
||||
actionColor = nightMode ? R.color.active_color_primary_dark : R.color.active_color_primary_light;
|
||||
}
|
||||
tvAction.setTextColor(ContextCompat.getColor(ctx, actionColor));
|
||||
if (maxLines != null) {
|
||||
tvMessage.setMaxLines(maxLines);
|
||||
}
|
||||
if (backgroundColor == null) {
|
||||
backgroundColor = nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
|
||||
}
|
||||
view.setBackgroundColor(ContextCompat.getColor(ctx, backgroundColor));
|
||||
}
|
||||
|
||||
public static void setupLayoutDirection(View layout) {
|
||||
Context ctx = layout.getContext();
|
||||
Locale currentLocale = ctx.getResources().getConfiguration().locale;
|
||||
|
|
|
@ -264,7 +264,7 @@ public class ContributionVersionActivity extends OsmandListActivity {
|
|||
StringBuilder format = new StringBuilder();
|
||||
format.append(AndroidUtils.formatDateTime(getMyApplication(), build.date.getTime()))/*.append(" : ").append(build.size).append(" MB")*/;
|
||||
description.setText(format.toString());
|
||||
int color = getResources().getColor(R.color.color_unknown);
|
||||
int color = getResources().getColor(R.color.text_color_secondary_dark);
|
||||
if (currentInstalledDate != null) {
|
||||
if (currentInstalledDate.before(build.date)) {
|
||||
color = getResources().getColor(R.color.color_update);
|
||||
|
|
|
@ -426,7 +426,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
mapActivity.getContextMenu().close();
|
||||
MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), new LatLon(latitude, longitude));
|
||||
} else if (standardId == R.string.avoid_road) {
|
||||
getMyApplication().getAvoidSpecificRoads().addImpassableRoad(mapActivity, new LatLon(latitude, longitude), true, false);
|
||||
getMyApplication().getAvoidSpecificRoads().addImpassableRoad(mapActivity, new LatLon(latitude, longitude), true, false, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -7,6 +7,7 @@ import android.view.WindowManager;
|
|||
|
||||
import net.osmand.Location;
|
||||
import net.osmand.StateChangedListener;
|
||||
import net.osmand.binary.BinaryMapDataObject;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.RotatedTileBox;
|
||||
import net.osmand.map.IMapLocationListener;
|
||||
|
@ -30,6 +31,7 @@ import net.osmand.util.MapUtils;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Map;
|
||||
|
||||
public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLocationListener,
|
||||
OsmAndCompassListener, MapMarkerChangedListener {
|
||||
|
@ -456,7 +458,10 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
|
|||
protected WorldRegion doInBackground(LatLon... latLons) {
|
||||
try {
|
||||
if (latLons != null && latLons.length > 0) {
|
||||
return app.getRegions().getSmallestBinaryMapDataObjectAt(latLons[0]).getKey();
|
||||
Map.Entry<WorldRegion, BinaryMapDataObject> reg = app.getRegions().getSmallestBinaryMapDataObjectAt(latLons[0]);
|
||||
if(reg != null) {
|
||||
return reg.getKey();
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// ignore
|
||||
|
|
|
@ -118,6 +118,7 @@ public class DownloadIndexesThread {
|
|||
if (app.getDownloadService() != null) {
|
||||
app.getDownloadService().stopService(app);
|
||||
}
|
||||
app.getAvoidSpecificRoads().initRouteObjects(true);
|
||||
}
|
||||
|
||||
public void initSettingsFirstMap(WorldRegion reg) {
|
||||
|
|
|
@ -541,6 +541,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
|||
if (operation == DELETE_OPERATION) {
|
||||
File f = new File(info.getPathToData());
|
||||
successfull = Algorithms.removeAllFiles(f);
|
||||
|
||||
if (InAppPurchaseHelper.isSubscribedToLiveUpdates(getMyApplication())) {
|
||||
String fileNameWithoutExtension =
|
||||
Algorithms.getFileNameWithoutExtension(f);
|
||||
|
@ -550,6 +551,14 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
|||
}
|
||||
if (successfull) {
|
||||
getMyApplication().getResourceManager().closeFile(info.getFileName());
|
||||
File tShm = new File(f.getParentFile(), f.getName() + "-shm");
|
||||
File tWal = new File(f.getParentFile(), f.getName() + "-wal");
|
||||
if(tShm.exists()) {
|
||||
Algorithms.removeAllFiles(tShm);
|
||||
}
|
||||
if(tWal.exists()) {
|
||||
Algorithms.removeAllFiles(tWal);
|
||||
}
|
||||
}
|
||||
} else if (operation == RESTORE_OPERATION) {
|
||||
successfull = move(new File(info.getPathToData()), getFileToRestore(info));
|
||||
|
|
|
@ -31,6 +31,7 @@ import net.osmand.Collator;
|
|||
import net.osmand.CollatorStringMatcher;
|
||||
import net.osmand.OsmAndCollator;
|
||||
import net.osmand.ResultMatcher;
|
||||
import net.osmand.binary.BinaryMapDataObject;
|
||||
import net.osmand.binary.BinaryMapIndexReader;
|
||||
import net.osmand.binary.BinaryMapIndexReader.SearchRequest;
|
||||
import net.osmand.data.Amenity;
|
||||
|
@ -61,6 +62,7 @@ import java.util.Collections;
|
|||
import java.util.Comparator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class SearchDialogFragment extends DialogFragment implements DownloadEvents, OnItemClickListener {
|
||||
|
||||
|
@ -416,7 +418,10 @@ public class SearchDialogFragment extends DialogFragment implements DownloadEven
|
|||
Amenity amenity = cityItem.getAmenity();
|
||||
WorldRegion downloadRegion = null;
|
||||
try {
|
||||
downloadRegion = osmandRegions.getSmallestBinaryMapDataObjectAt(amenity.getLocation()).getKey();
|
||||
Map.Entry<WorldRegion, BinaryMapDataObject> res = osmandRegions.getSmallestBinaryMapDataObjectAt(amenity.getLocation());
|
||||
if(res != null) {
|
||||
downloadRegion = res.getKey();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// ignore
|
||||
}
|
||||
|
|
|
@ -50,32 +50,44 @@ public class AvoidSpecificRoads {
|
|||
|
||||
private OsmandApplication app;
|
||||
|
||||
private Map<LatLon, RouteDataObject> impassableRoads = new LinkedHashMap<>();
|
||||
private Map<LatLon, AvoidRoadInfo> impassableRoads = new LinkedHashMap<>();
|
||||
|
||||
public AvoidSpecificRoads(final OsmandApplication app) {
|
||||
this.app = app;
|
||||
for (LatLon latLon : app.getSettings().getImpassableRoadPoints()) {
|
||||
impassableRoads.put(latLon, null);
|
||||
for (AvoidRoadInfo avoidRoadInfo : app.getSettings().getImpassableRoadPoints()) {
|
||||
impassableRoads.put(new LatLon(avoidRoadInfo.latitude, avoidRoadInfo.longitude), avoidRoadInfo);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<LatLon, RouteDataObject> getImpassableRoads() {
|
||||
public Map<LatLon, AvoidRoadInfo> getImpassableRoads() {
|
||||
return impassableRoads;
|
||||
}
|
||||
|
||||
public void initRouteObjects() {
|
||||
for (LatLon latLon : impassableRoads.keySet()) {
|
||||
addImpassableRoad(null, latLon, false, true);
|
||||
public void initRouteObjects(boolean force) {
|
||||
for (Map.Entry<LatLon, AvoidRoadInfo> entry : impassableRoads.entrySet()) {
|
||||
AvoidRoadInfo roadInfo = entry.getValue();
|
||||
if (roadInfo.id != 0) {
|
||||
for (RoutingConfiguration.Builder builder : app.getAllRoutingConfigs()) {
|
||||
if (force) {
|
||||
builder.removeImpassableRoad(roadInfo.id);
|
||||
} else {
|
||||
builder.addImpassableRoad(roadInfo.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (force || roadInfo.id == 0) {
|
||||
addImpassableRoad(null, entry.getKey(), false, true, roadInfo.appModeKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private ArrayAdapter<LatLon> createAdapter(MapActivity mapActivity, boolean nightMode) {
|
||||
final ArrayList<LatLon> points = new ArrayList<>(impassableRoads.keySet());
|
||||
private ArrayAdapter<AvoidRoadInfo> createAdapter(MapActivity mapActivity, boolean nightMode) {
|
||||
final ArrayList<AvoidRoadInfo> points = new ArrayList<>(impassableRoads.values());
|
||||
final LatLon mapLocation = mapActivity.getMapLocation();
|
||||
final LayoutInflater inflater = UiUtilities.getInflater(mapActivity, nightMode);
|
||||
Context themedContext = UiUtilities.getThemedContext(mapActivity, nightMode);
|
||||
|
||||
return new ArrayAdapter<LatLon>(themedContext, R.layout.waypoint_reached, R.id.title, points) {
|
||||
return new ArrayAdapter<AvoidRoadInfo>(themedContext, R.layout.waypoint_reached, R.id.title, points) {
|
||||
@NonNull
|
||||
@Override
|
||||
public View getView(final int position, View convertView, @NonNull ViewGroup parent) {
|
||||
|
@ -83,12 +95,15 @@ public class AvoidSpecificRoads {
|
|||
if (v == null || v.findViewById(R.id.info_close) == null) {
|
||||
v = inflater.inflate(R.layout.waypoint_reached, parent, false);
|
||||
}
|
||||
final LatLon item = getItem(position);
|
||||
final AvoidRoadInfo item = getItem(position);
|
||||
v.findViewById(R.id.all_points).setVisibility(View.GONE);
|
||||
((ImageView) v.findViewById(R.id.waypoint_icon))
|
||||
.setImageDrawable(getIcon(R.drawable.ic_action_road_works_dark));
|
||||
((TextView) v.findViewById(R.id.waypoint_dist)).setText(getDist(mapLocation, item));
|
||||
((TextView) v.findViewById(R.id.waypoint_text)).setText(getText(item));
|
||||
|
||||
LatLon latLon = item != null ? new LatLon(item.latitude, item.longitude) : null;
|
||||
String name = item != null ? item.name : app.getString(R.string.shared_string_road);
|
||||
((TextView) v.findViewById(R.id.waypoint_dist)).setText(getDist(mapLocation, latLon));
|
||||
((TextView) v.findViewById(R.id.waypoint_text)).setText(name);
|
||||
ImageButton remove = (ImageButton) v.findViewById(R.id.info_close);
|
||||
remove.setVisibility(View.VISIBLE);
|
||||
remove.setImageDrawable(getIcon(R.drawable.ic_action_remove_dark));
|
||||
|
@ -117,25 +132,15 @@ public class AvoidSpecificRoads {
|
|||
|
||||
public String getText(@Nullable LatLon point) {
|
||||
if (point != null) {
|
||||
RouteDataObject obj = impassableRoads.get(point);
|
||||
if (obj != null) {
|
||||
String locale = app.getSettings().MAP_PREFERRED_LOCALE.get();
|
||||
boolean transliterate = app.getSettings().MAP_TRANSLITERATE_NAMES.get();
|
||||
String name = RoutingHelper.formatStreetName(
|
||||
obj.getName(locale, transliterate),
|
||||
obj.getRef(locale, transliterate, true),
|
||||
obj.getDestinationName(locale, transliterate, true),
|
||||
app.getString(R.string.towards)
|
||||
);
|
||||
if (!TextUtils.isEmpty(name)) {
|
||||
return name;
|
||||
}
|
||||
AvoidRoadInfo obj = impassableRoads.get(point);
|
||||
if (obj != null && !TextUtils.isEmpty(obj.name)) {
|
||||
return obj.name;
|
||||
}
|
||||
}
|
||||
return app.getString(R.string.shared_string_road);
|
||||
}
|
||||
|
||||
public String getText(@Nullable RouteDataObject obj) {
|
||||
public String getRoadName(@Nullable RouteDataObject obj) {
|
||||
if (obj != null) {
|
||||
String locale = app.getSettings().MAP_PREFERRED_LOCALE.get();
|
||||
boolean transliterate = app.getSettings().MAP_TRANSLITERATE_NAMES.get();
|
||||
|
@ -161,15 +166,15 @@ public class AvoidSpecificRoads {
|
|||
|
||||
public void removeImpassableRoad(LatLon latLon) {
|
||||
app.getSettings().removeImpassableRoad(latLon);
|
||||
RouteDataObject obj = impassableRoads.remove(latLon);
|
||||
AvoidRoadInfo obj = impassableRoads.remove(latLon);
|
||||
if (obj != null) {
|
||||
for (RoutingConfiguration.Builder builder : app.getAllRoutingConfigs()) {
|
||||
builder.removeImpassableRoad(obj);
|
||||
builder.removeImpassableRoad(obj.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void removeImpassableRoad(RouteDataObject obj) {
|
||||
public void removeImpassableRoad(AvoidRoadInfo obj) {
|
||||
removeImpassableRoad(getLocation(obj));
|
||||
}
|
||||
|
||||
|
@ -182,13 +187,13 @@ public class AvoidSpecificRoads {
|
|||
if (impassableRoads.isEmpty()) {
|
||||
bld.setMessage(R.string.avoid_roads_msg);
|
||||
} else {
|
||||
final ArrayAdapter<LatLon> listAdapter = createAdapter(mapActivity, nightMode);
|
||||
final ArrayAdapter<AvoidRoadInfo> listAdapter = createAdapter(mapActivity, nightMode);
|
||||
bld.setAdapter(listAdapter, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
LatLon point = listAdapter.getItem(which);
|
||||
AvoidRoadInfo point = listAdapter.getItem(which);
|
||||
if (point != null) {
|
||||
showOnMap(mapActivity, point.getLatitude(), point.getLongitude(), getText(point));
|
||||
showOnMap(mapActivity, point.latitude, point.longitude, point.name);
|
||||
}
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
@ -210,7 +215,7 @@ public class AvoidSpecificRoads {
|
|||
cm.setSelectOnMap(new CallbackWithObject<LatLon>() {
|
||||
@Override
|
||||
public boolean processResult(LatLon result) {
|
||||
addImpassableRoad(mapActivity, result, true, false);
|
||||
addImpassableRoad(mapActivity, result, true, false, null);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
@ -219,11 +224,14 @@ public class AvoidSpecificRoads {
|
|||
public void addImpassableRoad(@Nullable final MapActivity mapActivity,
|
||||
@NonNull final LatLon loc,
|
||||
final boolean showDialog,
|
||||
final boolean skipWritingSettings) {
|
||||
final boolean skipWritingSettings,
|
||||
@Nullable final String appModeKey) {
|
||||
final Location ll = new Location("");
|
||||
ll.setLatitude(loc.getLatitude());
|
||||
ll.setLongitude(loc.getLongitude());
|
||||
ApplicationMode appMode = app.getRoutingHelper().getAppMode();
|
||||
|
||||
ApplicationMode defaultAppMode = app.getRoutingHelper().getAppMode();
|
||||
final ApplicationMode appMode = appModeKey != null ? ApplicationMode.valueOfStringKey(appModeKey, defaultAppMode) : defaultAppMode;
|
||||
|
||||
List<RouteSegmentResult> roads = app.getRoutingHelper().getRoute().getOriginalRoute();
|
||||
if (mapActivity != null && roads != null) {
|
||||
|
@ -236,9 +244,12 @@ public class AvoidSpecificRoads {
|
|||
LatLon newLoc = new LatLon(MapUtils.get31LatitudeY((int) point.y), MapUtils.get31LongitudeX((int) point.x));
|
||||
ll.setLatitude(newLoc.getLatitude());
|
||||
ll.setLongitude(newLoc.getLongitude());
|
||||
addImpassableRoadInternal(roads.get(searchResult.getRoadIndex()).getObject(), ll, showDialog, mapActivity, newLoc);
|
||||
|
||||
RouteDataObject object = roads.get(searchResult.getRoadIndex()).getObject();
|
||||
AvoidRoadInfo avoidRoadInfo = getAvoidRoadInfoForDataObject(object, newLoc.getLatitude(), newLoc.getLongitude(), appMode.getStringKey());
|
||||
addImpassableRoadInternal(avoidRoadInfo, showDialog, mapActivity, newLoc);
|
||||
if (!skipWritingSettings) {
|
||||
app.getSettings().addImpassableRoad(newLoc.getLatitude(), newLoc.getLongitude());
|
||||
app.getSettings().addImpassableRoad(avoidRoadInfo);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -252,7 +263,8 @@ public class AvoidSpecificRoads {
|
|||
Toast.makeText(mapActivity, R.string.error_avoid_specific_road, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
} else {
|
||||
addImpassableRoadInternal(object, ll, showDialog, mapActivity, loc);
|
||||
AvoidRoadInfo avoidRoadInfo = getAvoidRoadInfoForDataObject(object, ll.getLatitude(), ll.getLongitude(), appMode.getStringKey());
|
||||
addImpassableRoadInternal(avoidRoadInfo, showDialog, mapActivity, loc);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -264,19 +276,22 @@ public class AvoidSpecificRoads {
|
|||
|
||||
});
|
||||
if (!skipWritingSettings) {
|
||||
app.getSettings().addImpassableRoad(loc.getLatitude(), loc.getLongitude());
|
||||
AvoidRoadInfo avoidRoadInfo = getAvoidRoadInfoForDataObject(null, loc.getLatitude(), loc.getLongitude(), appMode.getStringKey());
|
||||
app.getSettings().addImpassableRoad(avoidRoadInfo);
|
||||
}
|
||||
}
|
||||
|
||||
public void replaceImpassableRoad(final MapActivity activity,
|
||||
final RouteDataObject currentObject,
|
||||
final AvoidRoadInfo currentObject,
|
||||
final LatLon newLoc,
|
||||
final boolean showDialog,
|
||||
final AvoidSpecificRoadsCallback callback) {
|
||||
final Location ll = new Location("");
|
||||
ll.setLatitude(newLoc.getLatitude());
|
||||
ll.setLongitude(newLoc.getLongitude());
|
||||
ApplicationMode appMode = app.getRoutingHelper().getAppMode();
|
||||
|
||||
ApplicationMode defaultAppMode = app.getRoutingHelper().getAppMode();
|
||||
final ApplicationMode appMode = ApplicationMode.valueOfStringKey(currentObject.appModeKey, defaultAppMode);
|
||||
|
||||
app.getLocationProvider().getRouteSegment(ll, appMode, false, new ResultMatcher<RouteDataObject>() {
|
||||
|
||||
|
@ -292,12 +307,13 @@ public class AvoidSpecificRoads {
|
|||
app.getSettings().moveImpassableRoad(oldLoc, newLoc);
|
||||
impassableRoads.remove(oldLoc);
|
||||
for (RoutingConfiguration.Builder builder : app.getAllRoutingConfigs()) {
|
||||
builder.removeImpassableRoad(currentObject);
|
||||
builder.removeImpassableRoad(currentObject.id);
|
||||
}
|
||||
addImpassableRoadInternal(object, ll, showDialog, activity, newLoc);
|
||||
AvoidRoadInfo avoidRoadInfo = getAvoidRoadInfoForDataObject(object, newLoc.getLatitude(), newLoc.getLongitude(), appMode.getStringKey());
|
||||
|
||||
addImpassableRoadInternal(avoidRoadInfo, showDialog, activity, newLoc);
|
||||
if (callback != null) {
|
||||
callback.onAddImpassableRoad(true, object);
|
||||
callback.onAddImpassableRoad(true, avoidRoadInfo);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -310,19 +326,19 @@ public class AvoidSpecificRoads {
|
|||
});
|
||||
}
|
||||
|
||||
private void addImpassableRoadInternal(@NonNull RouteDataObject object,
|
||||
@NonNull Location ll,
|
||||
private void addImpassableRoadInternal(@NonNull AvoidRoadInfo avoidRoadInfo,
|
||||
boolean showDialog,
|
||||
@Nullable MapActivity activity,
|
||||
@NonNull LatLon loc) {
|
||||
boolean roadAdded = false;
|
||||
for (RoutingConfiguration.Builder builder : app.getAllRoutingConfigs()) {
|
||||
roadAdded |= builder.addImpassableRoad(object, ll);
|
||||
roadAdded |= builder.addImpassableRoad(avoidRoadInfo.id);
|
||||
}
|
||||
if (roadAdded) {
|
||||
impassableRoads.put(loc, object);
|
||||
app.getSettings().updateImpassableRoadInfo(avoidRoadInfo);
|
||||
impassableRoads.put(loc, avoidRoadInfo);
|
||||
} else {
|
||||
LatLon location = getLocation(object);
|
||||
LatLon location = getLocation(avoidRoadInfo);
|
||||
if (location != null) {
|
||||
app.getSettings().removeImpassableRoad(location);
|
||||
}
|
||||
|
@ -347,21 +363,40 @@ public class AvoidSpecificRoads {
|
|||
MapActivity.launchMapActivityMoveToTop(ctx);
|
||||
}
|
||||
|
||||
public LatLon getLocation(RouteDataObject object) {
|
||||
Location location = null;
|
||||
public LatLon getLocation(AvoidRoadInfo avoidRoadInfo) {
|
||||
for (RoutingConfiguration.Builder builder : app.getAllRoutingConfigs()) {
|
||||
location = builder.getImpassableRoadLocations().get(object.getId());
|
||||
if (location != null) {
|
||||
break;
|
||||
if (builder.getImpassableRoadLocations().contains(avoidRoadInfo.id)) {
|
||||
return new LatLon(avoidRoadInfo.latitude, avoidRoadInfo.longitude);
|
||||
}
|
||||
}
|
||||
return location == null ? null : new LatLon(location.getLatitude(), location.getLongitude());
|
||||
return null;
|
||||
}
|
||||
|
||||
public interface AvoidSpecificRoadsCallback {
|
||||
|
||||
void onAddImpassableRoad(boolean success, RouteDataObject newObject);
|
||||
void onAddImpassableRoad(boolean success, AvoidRoadInfo avoidRoadInfo);
|
||||
|
||||
boolean isCancelled();
|
||||
}
|
||||
|
||||
private AvoidRoadInfo getAvoidRoadInfoForDataObject(@Nullable RouteDataObject object, double lat, double lon, String appModeKey) {
|
||||
AvoidRoadInfo avoidRoadInfo = impassableRoads.get(new LatLon(lat, lon));
|
||||
if (avoidRoadInfo == null) {
|
||||
avoidRoadInfo = new AvoidRoadInfo();
|
||||
}
|
||||
avoidRoadInfo.id = object != null ? object.id : 0;
|
||||
avoidRoadInfo.latitude = lat;
|
||||
avoidRoadInfo.longitude = lon;
|
||||
avoidRoadInfo.appModeKey = appModeKey;
|
||||
avoidRoadInfo.name = getRoadName(object);
|
||||
return avoidRoadInfo;
|
||||
}
|
||||
|
||||
public static class AvoidRoadInfo {
|
||||
public long id;
|
||||
public double latitude;
|
||||
public double longitude;
|
||||
public String name;
|
||||
public String appModeKey;
|
||||
}
|
||||
}
|
|
@ -22,7 +22,6 @@ import net.osmand.PlatformUtil;
|
|||
import net.osmand.aidl.AidlMapPointWrapper;
|
||||
import net.osmand.binary.BinaryMapDataObject;
|
||||
import net.osmand.binary.BinaryMapIndexReader.TagValuePair;
|
||||
import net.osmand.binary.RouteDataObject;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.FavouritePoint;
|
||||
import net.osmand.data.LatLon;
|
||||
|
@ -45,6 +44,7 @@ import net.osmand.plus.download.DownloadActivityType;
|
|||
import net.osmand.plus.download.DownloadIndexesThread;
|
||||
import net.osmand.plus.download.DownloadValidationManager;
|
||||
import net.osmand.plus.download.IndexItem;
|
||||
import net.osmand.plus.helpers.AvoidSpecificRoads;
|
||||
import net.osmand.plus.helpers.SearchHistoryHelper;
|
||||
import net.osmand.plus.mapcontextmenu.MenuBuilder.CollapsableView;
|
||||
import net.osmand.plus.mapcontextmenu.MenuBuilder.CollapseExpandListener;
|
||||
|
@ -220,8 +220,8 @@ public abstract class MenuController extends BaseMenuController implements Colla
|
|||
} else if (pointDescription.isMyLocation()) {
|
||||
menuController = new MyLocationMenuController(mapActivity, pointDescription);
|
||||
}
|
||||
} else if (object instanceof RouteDataObject) {
|
||||
menuController = new ImpassibleRoadsMenuController(mapActivity, pointDescription, (RouteDataObject) object);
|
||||
} else if (object instanceof AvoidSpecificRoads.AvoidRoadInfo) {
|
||||
menuController = new ImpassibleRoadsMenuController(mapActivity, pointDescription, (AvoidSpecificRoads.AvoidRoadInfo) object);
|
||||
} else if (object instanceof RenderedObject) {
|
||||
menuController = new RenderedObjectMenuController(mapActivity, pointDescription, (RenderedObject) object);
|
||||
} else if (object instanceof MapillaryImage) {
|
||||
|
|
|
@ -4,24 +4,24 @@ import android.graphics.drawable.Drawable;
|
|||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
|
||||
import net.osmand.binary.RouteDataObject;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.helpers.AvoidSpecificRoads.AvoidRoadInfo;
|
||||
import net.osmand.plus.mapcontextmenu.MenuBuilder;
|
||||
import net.osmand.plus.mapcontextmenu.MenuController;
|
||||
import net.osmand.plus.routing.RoutingHelper;
|
||||
|
||||
public class ImpassibleRoadsMenuController extends MenuController {
|
||||
|
||||
private RouteDataObject route;
|
||||
private AvoidRoadInfo avoidRoadInfo;
|
||||
|
||||
public ImpassibleRoadsMenuController(@NonNull MapActivity mapActivity,
|
||||
@NonNull PointDescription pointDescription,
|
||||
@NonNull RouteDataObject route) {
|
||||
@NonNull AvoidRoadInfo avoidRoadInfo) {
|
||||
super(new MenuBuilder(mapActivity), pointDescription, mapActivity);
|
||||
this.route = route;
|
||||
this.avoidRoadInfo = avoidRoadInfo;
|
||||
final OsmandApplication app = mapActivity.getMyApplication();
|
||||
leftTitleButtonController = new TitleButtonController() {
|
||||
@Override
|
||||
|
@ -29,7 +29,7 @@ public class ImpassibleRoadsMenuController extends MenuController {
|
|||
MapActivity activity = getMapActivity();
|
||||
if (activity != null) {
|
||||
app.getAvoidSpecificRoads().removeImpassableRoad(
|
||||
ImpassibleRoadsMenuController.this.route);
|
||||
ImpassibleRoadsMenuController.this.avoidRoadInfo);
|
||||
RoutingHelper rh = app.getRoutingHelper();
|
||||
if (rh.isRouteCalculated() || rh.isRouteBeingCalculated()) {
|
||||
rh.recalculateRouteDueToSettingsChange();
|
||||
|
@ -44,12 +44,12 @@ public class ImpassibleRoadsMenuController extends MenuController {
|
|||
|
||||
@Override
|
||||
protected void setObject(Object object) {
|
||||
route = (RouteDataObject) object;
|
||||
avoidRoadInfo = (AvoidRoadInfo) object;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object getObject() {
|
||||
return route;
|
||||
return avoidRoadInfo;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
|
|
@ -33,7 +33,7 @@ public class PointDescriptionMenuController extends MenuController {
|
|||
MapActivity activity = getMapActivity();
|
||||
if (activity != null) {
|
||||
AvoidSpecificRoads roads = activity.getMyApplication().getAvoidSpecificRoads();
|
||||
roads.addImpassableRoad(activity, getLatLon(), false, false);
|
||||
roads.addImpassableRoad(activity, getLatLon(), false, false, null);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -65,6 +65,7 @@ import net.osmand.plus.OsmAndLocationProvider.OsmAndLocationListener;
|
|||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.UiUtilities;
|
||||
import net.osmand.plus.Version;
|
||||
import net.osmand.plus.activities.SavingTrackHelper;
|
||||
import net.osmand.plus.activities.TrackActivity;
|
||||
|
@ -1092,7 +1093,7 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
|||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, R.color.active_color_primary_dark);
|
||||
UiUtilities.setupSnackbar(snackbar, !lightTheme);
|
||||
snackbar.show();
|
||||
}
|
||||
};
|
||||
|
@ -1119,7 +1120,7 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
|
|||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, R.color.active_color_primary_dark);
|
||||
UiUtilities.setupSnackbar(snackbar, !lightTheme);
|
||||
snackbar.show();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.osmand.plus.MapMarkersHelper.OnGroupSyncedListener;
|
|||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.UiUtilities;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.TrackActivity;
|
||||
import net.osmand.plus.mapmarkers.CoordinateInputDialogFragment.OnPointsSavedListener;
|
||||
|
@ -449,7 +450,7 @@ public class MapMarkersDialogFragment extends android.support.v4.app.DialogFragm
|
|||
}
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, R.color.active_color_primary_dark);
|
||||
UiUtilities.setupSnackbar(snackbar, !lightTheme);
|
||||
snackbar.show();
|
||||
}
|
||||
}
|
||||
|
@ -494,7 +495,7 @@ public class MapMarkersDialogFragment extends android.support.v4.app.DialogFragm
|
|||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, R.color.active_color_primary_dark);
|
||||
UiUtilities.setupSnackbar(snackbar, !lightTheme);
|
||||
snackbar.show();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -207,7 +207,7 @@ public class MapMarkersGroupsFragment extends Fragment implements OsmAndCompassL
|
|||
updateAdapter();
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, R.color.active_color_primary_dark);
|
||||
UiUtilities.setupSnackbar(snackbar, night);
|
||||
snackbar.show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,8 +171,7 @@ public class MapMarkersHistoryFragment extends Fragment implements MapMarkersHel
|
|||
}
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, night ? R.color.active_color_primary_dark : R.color.active_color_primary_light);
|
||||
snackbar.getView().setBackgroundColor(ContextCompat.getColor(app, night ? R.color.list_background_color_dark : R.color.list_background_color_light));
|
||||
UiUtilities.setupSnackbar(snackbar, night);
|
||||
snackbar.show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ public class SelectWptCategoriesBottomSheetDialogFragment extends MenuBottomShee
|
|||
if (gpxFile == null) {
|
||||
return;
|
||||
}
|
||||
int activeColorResId = nightMode ? R.color.active_color_primary_dark : R.color.active_color_primary_light;
|
||||
isUpdateMode = getArguments().getBoolean(UPDATE_CATEGORIES_KEY);
|
||||
List<String> categories = getArguments().getStringArrayList(ACTIVE_CATEGORIES_KEY);
|
||||
|
||||
|
@ -58,6 +59,7 @@ public class SelectWptCategoriesBottomSheetDialogFragment extends MenuBottomShee
|
|||
final BottomSheetItemWithCompoundButton[] selectAllItem = new BottomSheetItemWithCompoundButton[1];
|
||||
selectAllItem[0] = (BottomSheetItemWithCompoundButton) new BottomSheetItemWithCompoundButton.Builder()
|
||||
.setChecked(!isUpdateMode || categories!=null&&categories.size() == gpxFile.getPointsByCategories().size())
|
||||
.setCompoundButtonColorId(activeColorResId)
|
||||
.setDescription(getString(R.string.shared_string_total) + ": " + gpxFile.getPoints().size())
|
||||
.setIcon(getContentIcon(R.drawable.ic_action_group_select_all))
|
||||
.setTitle(getString(R.string.shared_string_select_all))
|
||||
|
@ -93,6 +95,7 @@ public class SelectWptCategoriesBottomSheetDialogFragment extends MenuBottomShee
|
|||
}
|
||||
}
|
||||
})
|
||||
.setCompoundButtonColorId(activeColorResId)
|
||||
.setDescription(String.valueOf(pointsByCategories.get(category).size()))
|
||||
.setIcon(getContentIcon(R.drawable.ic_action_folder))
|
||||
.setTitle(category.equals("") ? getString(R.string.shared_string_waypoints) : category)
|
||||
|
|
|
@ -74,6 +74,7 @@ public class MapMarkersActiveAdapter extends RecyclerView.Adapter<MapMarkerItemV
|
|||
ImageView markerImageViewToUpdate;
|
||||
int drawableResToUpdate;
|
||||
int markerColor = MapMarker.getColorId(marker.colorIndex);
|
||||
int actionIconColor = night ? R.color.icon_color_primary_dark : R.color.icon_color_primary_light;
|
||||
LatLon markerLatLon = new LatLon(marker.getLatitude(), marker.getLongitude());
|
||||
final boolean displayedInWidget = pos < mapActivity.getMyApplication().getSettings().DISPLAYED_MARKERS_WIDGETS_COUNT.get();
|
||||
if (showDirectionEnabled && displayedInWidget) {
|
||||
|
@ -98,7 +99,7 @@ public class MapMarkersActiveAdapter extends RecyclerView.Adapter<MapMarkerItemV
|
|||
holder.title.setTextColor(ContextCompat.getColor(mapActivity, night ? R.color.text_color_primary_dark : R.color.text_color_primary_light));
|
||||
holder.divider.setBackgroundColor(ContextCompat.getColor(mapActivity, night ? R.color.app_bar_color_dark : R.color.divider_color_light));
|
||||
holder.optionsBtn.setBackgroundDrawable(mapActivity.getResources().getDrawable(night ? R.drawable.marker_circle_background_dark_with_inset : R.drawable.marker_circle_background_light_with_inset));
|
||||
holder.optionsBtn.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_marker_passed, night ? R.color.active_buttons_and_links_text_dark : R.color.active_buttons_and_links_text_light));
|
||||
holder.optionsBtn.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_marker_passed, actionIconColor));
|
||||
holder.iconReorder.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_reorder));
|
||||
holder.description.setTextColor(ContextCompat.getColor(mapActivity, night ? R.color.icon_color_default_dark : R.color.icon_color_default_light));
|
||||
|
||||
|
@ -162,8 +163,7 @@ public class MapMarkersActiveAdapter extends RecyclerView.Adapter<MapMarkerItemV
|
|||
notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, night ? R.color.active_color_primary_dark : R.color.active_color_primary_light);
|
||||
snackbar.getView().setBackgroundColor(ContextCompat.getColor(mapActivity, night ? R.color.list_background_color_dark : R.color.list_background_color_light));
|
||||
UiUtilities.setupSnackbar(snackbar, night);
|
||||
snackbar.show();
|
||||
}
|
||||
});
|
||||
|
@ -229,8 +229,7 @@ public class MapMarkersActiveAdapter extends RecyclerView.Adapter<MapMarkerItemV
|
|||
notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, night ? R.color.active_color_primary_dark : R.color.active_color_primary_light);
|
||||
snackbar.getView().setBackgroundColor(ContextCompat.getColor(mapActivity, night ? R.color.list_background_color_dark : R.color.list_background_color_light));
|
||||
UiUtilities.setupSnackbar(snackbar, night);
|
||||
snackbar.show();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ import android.view.ViewGroup;
|
|||
import android.widget.CompoundButton;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import net.osmand.AndroidUtils;
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.GPXUtilities;
|
||||
|
@ -272,6 +271,7 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter<RecyclerView.V
|
|||
}
|
||||
ImageView markerImageViewToUpdate;
|
||||
int drawableResToUpdate;
|
||||
int actionIconColor = night ? R.color.icon_color_primary_dark : R.color.icon_color_primary_light;
|
||||
final boolean markerToHighlight = showDirectionMarkers.contains(marker);
|
||||
if (showDirectionEnabled && markerToHighlight) {
|
||||
itemViewHolder.iconDirection.setVisibility(View.GONE);
|
||||
|
@ -294,8 +294,7 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter<RecyclerView.V
|
|||
itemViewHolder.title.setTextColor(ContextCompat.getColor(mapActivity, night ? R.color.text_color_primary_dark : R.color.text_color_primary_light));
|
||||
itemViewHolder.divider.setBackgroundColor(ContextCompat.getColor(mapActivity, night ? R.color.app_bar_color_dark : R.color.divider_color_light));
|
||||
itemViewHolder.optionsBtn.setBackgroundDrawable(mapActivity.getResources().getDrawable(night ? R.drawable.marker_circle_background_dark_with_inset : R.drawable.marker_circle_background_light_with_inset));
|
||||
itemViewHolder.optionsBtn.setImageDrawable(iconsCache.getIcon(markerInHistory ? R.drawable.ic_action_reset_to_default_dark : R.drawable.ic_action_marker_passed,
|
||||
night ? R.color.icon_color_primary_dark : R.color.active_buttons_and_links_text_light));
|
||||
itemViewHolder.optionsBtn.setImageDrawable(iconsCache.getIcon(markerInHistory ? R.drawable.ic_action_reset_to_default_dark : R.drawable.ic_action_marker_passed, actionIconColor));
|
||||
itemViewHolder.description.setTextColor(ContextCompat.getColor(mapActivity, night ? R.color.icon_color_default_dark : R.color.icon_color_default_light));
|
||||
|
||||
drawableResToUpdate = R.drawable.ic_direction_arrow;
|
||||
|
@ -354,8 +353,7 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter<RecyclerView.V
|
|||
updateDisplayedData();
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, night ? R.color.active_color_primary_dark : R.color.active_color_primary_light);
|
||||
snackbar.getView().setBackgroundColor(ContextCompat.getColor(app, night ? R.color.list_background_color_dark : R.color.list_background_color_light));
|
||||
UiUtilities.setupSnackbar(snackbar, night);
|
||||
snackbar.show();
|
||||
}
|
||||
}
|
||||
|
@ -490,7 +488,7 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter<RecyclerView.V
|
|||
mapMarkersHelper.enableGroup(group);
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, R.color.active_color_primary_dark);
|
||||
UiUtilities.setupSnackbar(snackbar, night);
|
||||
snackbar.show();
|
||||
}
|
||||
}
|
||||
|
@ -498,6 +496,7 @@ public class MapMarkersGroupsAdapter extends RecyclerView.Adapter<RecyclerView.V
|
|||
headerViewHolder.disableGroupSwitch.setOnCheckedChangeListener(null);
|
||||
headerViewHolder.disableGroupSwitch.setChecked(!groupIsDisabled);
|
||||
headerViewHolder.disableGroupSwitch.setOnCheckedChangeListener(checkedChangeListener);
|
||||
UiUtilities.setupCompoundButton(headerViewHolder.disableGroupSwitch, night, UiUtilities.CompoundButtonType.GLOBAL);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unsupported header");
|
||||
}
|
||||
|
|
|
@ -118,7 +118,8 @@ public class MapMarkersHistoryAdapter extends RecyclerView.Adapter<RecyclerView.
|
|||
final MapMarker marker = (MapMarker) getItem(position);
|
||||
itemViewHolder.iconReorder.setVisibility(View.GONE);
|
||||
|
||||
int color = R.color.icon_color_default_dark;
|
||||
int color = night ? R.color.icon_color_default_dark : R.color.icon_color_default_light;
|
||||
int actionIconColor = night ? R.color.icon_color_primary_dark : R.color.icon_color_primary_light;
|
||||
itemViewHolder.icon.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_flag_dark, color));
|
||||
|
||||
itemViewHolder.title.setText(marker.getName(app));
|
||||
|
@ -134,7 +135,7 @@ public class MapMarkersHistoryAdapter extends RecyclerView.Adapter<RecyclerView.
|
|||
itemViewHolder.description.setText(desc);
|
||||
|
||||
itemViewHolder.optionsBtn.setBackgroundDrawable(app.getResources().getDrawable(night ? R.drawable.marker_circle_background_dark_with_inset : R.drawable.marker_circle_background_light_with_inset));
|
||||
itemViewHolder.optionsBtn.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_reset_to_default_dark));
|
||||
itemViewHolder.optionsBtn.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_reset_to_default_dark, actionIconColor));
|
||||
itemViewHolder.optionsBtn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
@ -151,8 +152,7 @@ public class MapMarkersHistoryAdapter extends RecyclerView.Adapter<RecyclerView.
|
|||
app.getMapMarkersHelper().moveMapMarkerToHistory(marker);
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, night ? R.color.active_color_primary_dark : R.color.active_color_primary_light);
|
||||
snackbar.getView().setBackgroundColor(ContextCompat.getColor(app, night ? R.color.list_background_color_dark : R.color.list_background_color_light));
|
||||
UiUtilities.setupSnackbar(snackbar, night);
|
||||
snackbar.show();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -203,7 +203,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment implement
|
|||
public void onPause() {
|
||||
super.onPause();
|
||||
updateEnable = false;
|
||||
if (operationTask != null) {
|
||||
if (operationTask != null && !(operationTask instanceof SelectGpxTask)) {
|
||||
operationTask.cancel(true);
|
||||
}
|
||||
if (actionMode != null) {
|
||||
|
|
|
@ -550,7 +550,8 @@ public class TrackPointFragment extends OsmandExpandableListFragment implements
|
|||
super.onDismissed(transientBottomBar, event);
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, R.color.active_color_primary_dark);
|
||||
boolean nightMode = !app.getSettings().isLightContent();
|
||||
UiUtilities.setupSnackbar(snackbar, nightMode);
|
||||
snackbar.show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -192,9 +192,15 @@ public class SelectProfileBottomSheetDialogFragment extends BasePreferenceBottom
|
|||
tvTitle.setText(profile.getName());
|
||||
tvDescription.setText(profile.getDescription());
|
||||
|
||||
final boolean isSelected = profile.getStringKey().equals(selectedItemKey);
|
||||
final Drawable drawableIcon = app.getUIUtilities().getIcon(profile.getIconRes(),
|
||||
isSelected ? activeColorResId : iconDefaultColorResId);
|
||||
boolean isSelected = profile.getStringKey().equals(selectedItemKey);
|
||||
int iconColor;
|
||||
if (type.equals(TYPE_BASE_APP_PROFILE)) {
|
||||
iconColor = profile.getIconColor(nightMode);
|
||||
} else {
|
||||
iconColor = isSelected ? activeColorResId : iconDefaultColorResId;
|
||||
}
|
||||
|
||||
Drawable drawableIcon = app.getUIUtilities().getIcon(profile.getIconRes(), iconColor);
|
||||
ivIcon.setImageDrawable(drawableIcon);
|
||||
compoundButton.setChecked(isSelected);
|
||||
UiUtilities.setupCompoundButton(compoundButton, nightMode, UiUtilities.CompoundButtonType.GLOBAL);
|
||||
|
@ -220,7 +226,7 @@ public class SelectProfileBottomSheetDialogFragment extends BasePreferenceBottom
|
|||
private void addButtonItem(int titleId, int iconId, OnClickListener listener) {
|
||||
OsmandApplication app = requiredMyApplication();
|
||||
|
||||
int activeColorResId = nightMode ? R.color.active_color_primary_dark : R.color.active_color_primary_light;
|
||||
int activeColorResId = isNightMode(app) ? R.color.active_color_primary_dark : R.color.active_color_primary_light;
|
||||
|
||||
View buttonView = View.inflate(app, R.layout.bottom_sheet_item_preference_btn, null);
|
||||
TextView tvTitle = buttonView.findViewById(R.id.title);
|
||||
|
|
|
@ -38,7 +38,6 @@ import net.osmand.Location;
|
|||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.StateChangedListener;
|
||||
import net.osmand.ValueHolder;
|
||||
import net.osmand.binary.RouteDataObject;
|
||||
import net.osmand.data.FavouritePoint;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.PointDescription;
|
||||
|
@ -67,6 +66,7 @@ import net.osmand.plus.base.ContextMenuFragment.MenuState;
|
|||
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||
import net.osmand.plus.helpers.GpxUiHelper;
|
||||
import net.osmand.plus.helpers.WaypointHelper;
|
||||
import net.osmand.plus.helpers.AvoidSpecificRoads.AvoidRoadInfo;
|
||||
import net.osmand.plus.mapcontextmenu.other.TrackDetailsMenuFragment;
|
||||
import net.osmand.plus.mapmarkers.MapMarkerSelectionFragment;
|
||||
import net.osmand.plus.poi.PoiUIFilter;
|
||||
|
@ -110,13 +110,13 @@ import org.apache.commons.logging.Log;
|
|||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.Stack;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public class MapRouteInfoMenu implements IRouteInformationListener, CardListener, FavoritesListener {
|
||||
|
||||
|
@ -1204,7 +1204,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
|||
final LinearLayout item = createToolbarOptionView(false, null, -1, -1, null);
|
||||
if (item != null) {
|
||||
item.findViewById(R.id.route_option_container).setVisibility(View.GONE);
|
||||
Map<LatLon, RouteDataObject> impassableRoads = new TreeMap<>();
|
||||
Map<LatLon, AvoidRoadInfo> impassableRoads = new HashMap<>();
|
||||
if (parameter instanceof AvoidRoadsRoutingParameter) {
|
||||
impassableRoads = app.getAvoidSpecificRoads().getImpassableRoads();
|
||||
}
|
||||
|
@ -1232,22 +1232,19 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
|||
return avoidedParameters;
|
||||
}
|
||||
|
||||
private void createImpassableRoadsItems(MapActivity mapActivity, Map<LatLon, RouteDataObject> impassableRoads, final LocalRoutingParameter parameter, final RouteMenuAppModes mode, final LinearLayout item) {
|
||||
OsmandApplication app = mapActivity.getMyApplication();
|
||||
Iterator<RouteDataObject> it = impassableRoads.values().iterator();
|
||||
private void createImpassableRoadsItems(MapActivity mapActivity, Map<LatLon, AvoidRoadInfo> impassableRoads,
|
||||
final LocalRoutingParameter parameter, final RouteMenuAppModes mode, final LinearLayout item) {
|
||||
Iterator<AvoidRoadInfo> it = impassableRoads.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
final RouteDataObject routeDataObject = it.next();
|
||||
final View container = createToolbarSubOptionView(false, app.getAvoidSpecificRoads().getText(routeDataObject), R.drawable.ic_action_remove_dark, !it.hasNext(), new OnClickListener() {
|
||||
final AvoidRoadInfo avoidRoadInfo = it.next();
|
||||
final View container = createToolbarSubOptionView(false, avoidRoadInfo.name, R.drawable.ic_action_remove_dark, !it.hasNext(), new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
if (mapActivity != null) {
|
||||
OsmandApplication app = mapActivity.getMyApplication();
|
||||
RoutingHelper routingHelper = app.getRoutingHelper();
|
||||
if (routeDataObject != null) {
|
||||
app.getAvoidSpecificRoads().removeImpassableRoad(routeDataObject);
|
||||
}
|
||||
routingHelper.recalculateRouteDueToSettingsChange();
|
||||
app.getAvoidSpecificRoads().removeImpassableRoad(avoidRoadInfo);
|
||||
app.getRoutingHelper().recalculateRouteDueToSettingsChange();
|
||||
if (app.getAvoidSpecificRoads().getImpassableRoads().isEmpty() && getAvoidedParameters(app).isEmpty()) {
|
||||
mode.parameters.remove(parameter);
|
||||
}
|
||||
|
|
|
@ -430,7 +430,13 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
|
|||
|
||||
boolean osmandRouter = applicationMode.getRouteService() == RouteProvider.RouteService.OSMAND;
|
||||
if (!osmandRouter) {
|
||||
if (applicationMode.getRouteService() == RouteProvider.RouteService.STRAIGHT) {
|
||||
routingParameters = AppModeOptions.STRAIGHT.routingParameters;
|
||||
} else if (applicationMode.getRouteService() == RouteProvider.RouteService.DIRECT_TO) {
|
||||
routingParameters = AppModeOptions.DIRECT_TO.routingParameters;
|
||||
} else {
|
||||
routingParameters = AppModeOptions.OTHER.routingParameters;
|
||||
}
|
||||
} else if (applicationMode.isDerivedRoutingFrom(ApplicationMode.CAR)) {
|
||||
routingParameters = AppModeOptions.CAR.routingParameters;
|
||||
} else if (applicationMode.isDerivedRoutingFrom(ApplicationMode.BICYCLE)) {
|
||||
|
@ -579,6 +585,22 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
|
|||
DividerItem.KEY,
|
||||
GpxLocalRoutingParameter.KEY,
|
||||
OtherSettingsRoutingParameter.KEY,
|
||||
RouteSimulationItem.KEY),
|
||||
|
||||
STRAIGHT(MuteSoundRoutingParameter.KEY,
|
||||
DividerItem.KEY,
|
||||
ShowAlongTheRouteItem.KEY,
|
||||
DividerItem.KEY,
|
||||
GpxLocalRoutingParameter.KEY,
|
||||
OtherSettingsRoutingParameter.KEY,
|
||||
RouteSimulationItem.KEY),
|
||||
|
||||
DIRECT_TO(MuteSoundRoutingParameter.KEY,
|
||||
DividerItem.KEY,
|
||||
ShowAlongTheRouteItem.KEY,
|
||||
DividerItem.KEY,
|
||||
GpxLocalRoutingParameter.KEY,
|
||||
OtherSettingsRoutingParameter.KEY,
|
||||
RouteSimulationItem.KEY);
|
||||
|
||||
|
||||
|
|
|
@ -1037,10 +1037,7 @@ public class RouteCalculationResult {
|
|||
nextInd++;
|
||||
}
|
||||
}
|
||||
int dist = getListDistance(currentRoute);
|
||||
if (fromLoc != null) {
|
||||
dist += fromLoc.distanceTo(locations.get(currentRoute));
|
||||
}
|
||||
int dist = getDistanceToFinish(fromLoc);
|
||||
if (nextInd < directions.size()) {
|
||||
info.directionInfo = directions.get(nextInd);
|
||||
if (directions.get(nextInd).routePointOffset <= currentRoute
|
||||
|
@ -1157,15 +1154,27 @@ public class RouteCalculationResult {
|
|||
return 0;
|
||||
}
|
||||
|
||||
public int getDistanceFromPoint(int locationIndex) {
|
||||
if(listDistance != null && locationIndex < listDistance.length) {
|
||||
return listDistance[locationIndex];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean isPointPassed(int locationIndex) {
|
||||
return locationIndex <= currentRoute;
|
||||
}
|
||||
|
||||
public int getDistanceToFinish(Location fromLoc) {
|
||||
if(listDistance != null && currentRoute < listDistance.length){
|
||||
int dist = listDistance[currentRoute];
|
||||
Location l = locations.get(currentRoute);
|
||||
if(fromLoc != null){
|
||||
Location ap = this.currentStraightAnglePoint;
|
||||
int rp = currentStraightAngleRoute > currentRoute ? currentStraightAngleRoute : currentRoute;
|
||||
if(listDistance != null && rp < listDistance.length){
|
||||
int dist = listDistance[rp];
|
||||
Location l = locations.get(rp);
|
||||
if(ap != null){
|
||||
dist += fromLoc.distanceTo(ap);
|
||||
dist += ap.distanceTo(l);
|
||||
} else {
|
||||
dist += fromLoc.distanceTo(l);
|
||||
}
|
||||
return dist;
|
||||
|
@ -1174,12 +1183,8 @@ public class RouteCalculationResult {
|
|||
}
|
||||
|
||||
public int getDistanceToNextIntermediate(Location fromLoc) {
|
||||
int dist = getDistanceToFinish(fromLoc);
|
||||
if(listDistance != null && currentRoute < listDistance.length){
|
||||
int dist = listDistance[currentRoute];
|
||||
Location l = locations.get(currentRoute);
|
||||
if(fromLoc != null){
|
||||
dist += fromLoc.distanceTo(l);
|
||||
}
|
||||
if(nextIntermediate >= intermediatePoints.length ){
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -1245,8 +1250,8 @@ public class RouteCalculationResult {
|
|||
}
|
||||
|
||||
public void updateNextVisiblePoint(int nextPoint, Location mp) {
|
||||
currentStraightAngleRoute = nextPoint;
|
||||
currentStraightAnglePoint = mp;
|
||||
currentStraightAngleRoute = nextPoint;
|
||||
}
|
||||
|
||||
public static class NextDirectionInfo {
|
||||
|
|
|
@ -1240,29 +1240,35 @@ public class RouteProvider {
|
|||
}
|
||||
|
||||
private RouteCalculationResult findStraightRoute(RouteCalculationParams params) {
|
||||
Location currentLocation = params.currentLocation;
|
||||
LinkedList<Location> points = new LinkedList<>();
|
||||
List<Location> segments = new ArrayList<>();
|
||||
points.add(params.start);
|
||||
points.add(new Location("pnt", params.start.getLatitude(), params.start.getLongitude()));
|
||||
if(params.intermediates != null) {
|
||||
for (LatLon l : params.intermediates) {
|
||||
points.add(new Location("", l.getLatitude(), l.getLongitude()));
|
||||
points.add(new Location("pnt", l.getLatitude(), l.getLongitude()));
|
||||
}
|
||||
}
|
||||
points.add(new Location("", params.end.getLatitude(), params.end.getLongitude()));
|
||||
Location lastAdded = points.poll();
|
||||
segments.add(lastAdded);
|
||||
Location lastAdded = null;
|
||||
float speed = params.mode.getDefaultSpeed();
|
||||
List<RouteDirectionInfo> computeDirections = new ArrayList<RouteDirectionInfo>();
|
||||
while(!points.isEmpty()) {
|
||||
Location pl = points.peek();
|
||||
if (lastAdded.distanceTo(pl) < MIN_STRAIGHT_DIST) {
|
||||
if (lastAdded == null || lastAdded.distanceTo(pl) < MIN_STRAIGHT_DIST) {
|
||||
lastAdded = points.poll();
|
||||
if(lastAdded.getProvider().equals("pnt")) {
|
||||
RouteDirectionInfo previousInfo = new RouteDirectionInfo(speed, TurnType.straight());
|
||||
previousInfo.routePointOffset = segments.size();
|
||||
previousInfo.setDescriptionRoute(params.ctx.getString(R.string.route_head));
|
||||
computeDirections.add(previousInfo);
|
||||
}
|
||||
segments.add(lastAdded);
|
||||
} else {
|
||||
Location mp = MapUtils.calculateMidPoint(lastAdded, pl);
|
||||
points.add(0, mp);
|
||||
}
|
||||
}
|
||||
return new RouteCalculationResult(segments, null, params, null, false);
|
||||
return new RouteCalculationResult(segments, computeDirections, params, null, false);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -430,7 +430,6 @@ public class RoutingHelper {
|
|||
// 0. Route empty or needs to be extended? Then re-calculate route.
|
||||
if(route.isEmpty()) {
|
||||
calculateRoute = true;
|
||||
//originalRoute = null;
|
||||
} else {
|
||||
// 1. Update current route position status according to latest received location
|
||||
boolean finished = updateCurrentRouteStatus(currentLocation, posTolerance);
|
||||
|
|
|
@ -813,8 +813,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl
|
|||
public static String getAppModeDescription(Context ctx, ApplicationMode mode) {
|
||||
String description;
|
||||
if (mode.isCustomProfile()) {
|
||||
description = String.format(ctx.getString(R.string.profile_type_descr_string),
|
||||
Algorithms.capitalizeFirstLetterAndLowercase(mode.getParent().toHumanString()));
|
||||
description = ctx.getString(R.string.profile_type_custom_string);
|
||||
} else {
|
||||
description = ctx.getString(R.string.profile_type_base_string);
|
||||
}
|
||||
|
|
|
@ -156,9 +156,13 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment {
|
|||
protected void createToolbar(LayoutInflater inflater, View view) {
|
||||
super.createToolbar(inflater, view);
|
||||
if (isNewProfile) {
|
||||
TextView toolbarTitle = (TextView) view.findViewById(R.id.toolbar_title);
|
||||
if (toolbarTitle != null) {
|
||||
toolbarTitle.setText(getString(R.string.new_profile));
|
||||
}
|
||||
TextView toolbarSubtitle = (TextView) view.findViewById(R.id.toolbar_subtitle);
|
||||
if (toolbarSubtitle != null) {
|
||||
toolbarSubtitle.setText(getString(R.string.new_profile));
|
||||
toolbarSubtitle.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -366,8 +370,8 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment {
|
|||
Bundle bundle = new Bundle();
|
||||
fragment.setUsedOnMap(false);
|
||||
fragment.setAppMode(getSelectedAppMode());
|
||||
if (getSelectedAppMode() != null) {
|
||||
bundle.putString(SELECTED_KEY, getSelectedAppMode().getRoutingProfile());
|
||||
if (changedProfile.parent != null) {
|
||||
bundle.putString(SELECTED_KEY, changedProfile.parent.getStringKey());
|
||||
}
|
||||
bundle.putString(DIALOG_TYPE, TYPE_BASE_APP_PROFILE);
|
||||
fragment.setArguments(bundle);
|
||||
|
|
|
@ -1,14 +1,23 @@
|
|||
package net.osmand.plus.settings;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.support.v7.preference.PreferenceScreen;
|
||||
import android.support.v7.preference.PreferenceViewHolder;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.osmand.GPXUtilities;
|
||||
import net.osmand.Location;
|
||||
import net.osmand.StateChangedListener;
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
|
@ -17,6 +26,7 @@ import net.osmand.plus.OsmandApplication;
|
|||
import net.osmand.plus.OsmandSettings;
|
||||
import net.osmand.plus.OsmandSettings.BooleanPreference;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.UiUtilities;
|
||||
import net.osmand.plus.activities.SettingsBaseActivity;
|
||||
import net.osmand.plus.activities.SettingsNavigationActivity;
|
||||
import net.osmand.plus.routing.RouteProvider;
|
||||
|
@ -83,7 +93,6 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
|
|||
routeParametersInfo.setTitle(getString(R.string.route_parameters_info, getSelectedAppMode().toHumanString()));
|
||||
|
||||
setupRoutingPrefs();
|
||||
setupTimeConditionalRoutingPref();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -131,21 +140,19 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
|
|||
}
|
||||
PreferenceScreen screen = getPreferenceScreen();
|
||||
|
||||
ApplicationMode am = getSelectedAppMode();
|
||||
|
||||
SwitchPreferenceEx fastRoute = createSwitchPreferenceEx(app.getSettings().FAST_ROUTE_MODE.getId(), R.string.fast_route_mode, R.layout.preference_with_descr_dialog_and_switch);
|
||||
fastRoute.setIcon(getRoutingPrefIcon(app.getSettings().FAST_ROUTE_MODE.getId()));
|
||||
fastRoute.setDescription(getString(R.string.fast_route_mode_descr));
|
||||
fastRoute.setSummaryOn(R.string.shared_string_on);
|
||||
fastRoute.setSummaryOff(R.string.shared_string_off);
|
||||
|
||||
|
||||
ApplicationMode am = getSelectedAppMode();
|
||||
float defaultAllowedDeviation = RoutingHelper.getDefaultAllowedDeviation(settings, am,
|
||||
RoutingHelper.getPosTolerance(0));
|
||||
if (am.getRouteService() != RouteProvider.RouteService.OSMAND) {
|
||||
screen.addPreference(fastRoute);
|
||||
setupSelectRouteRecalcDistance(screen, defaultAllowedDeviation);
|
||||
} else {
|
||||
setupSelectRouteRecalcDistance(screen, defaultAllowedDeviation);
|
||||
|
||||
if (am.getRouteService() == RouteProvider.RouteService.OSMAND){
|
||||
GeneralRouter router = app.getRouter(am);
|
||||
clearParameters();
|
||||
if (router != null) {
|
||||
|
@ -231,9 +238,87 @@ public class RouteParametersFragment extends BaseSettingsFragment implements OnP
|
|||
}
|
||||
}
|
||||
}
|
||||
setupTimeConditionalRoutingPref();
|
||||
} else if (am.getRouteService() == RouteProvider.RouteService.BROUTER) {
|
||||
screen.addPreference(fastRoute);
|
||||
setupTimeConditionalRoutingPref();
|
||||
} else if (am.getRouteService() == RouteProvider.RouteService.STRAIGHT) {
|
||||
Preference straightAngle = new Preference(app.getApplicationContext());
|
||||
straightAngle.setPersistent(false);
|
||||
straightAngle.setKey(settings.ROUTE_STRAIGHT_ANGLE.getId());
|
||||
straightAngle.setTitle(getString(R.string.recalc_angle_dialog_title));
|
||||
straightAngle.setSummary(String.format(getString(R.string.shared_string_angle_param), (int) am.getStrAngle()));
|
||||
straightAngle.setLayoutResource(R.layout.preference_with_descr);
|
||||
straightAngle.setIcon(getRoutingPrefIcon("routing_recalc_distance")); //TODO change for appropriate icon when available
|
||||
getPreferenceScreen().addPreference(straightAngle);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
if (preference.getKey().equals(settings.ROUTE_STRAIGHT_ANGLE.getId())) {
|
||||
showSeekbarSettingsDialog(getActivity(), getSelectedAppMode());
|
||||
}
|
||||
return super.onPreferenceClick(preference);
|
||||
}
|
||||
|
||||
private void showSeekbarSettingsDialog(Activity activity, final ApplicationMode mode) {
|
||||
if (activity == null || mode == null) {
|
||||
return;
|
||||
}
|
||||
final OsmandApplication app = (OsmandApplication) activity.getApplication();
|
||||
final float[] angleValue = new float[] {mode.getStrAngle()};
|
||||
boolean nightMode = !app.getSettings().isLightContentForMode(mode);
|
||||
Context themedContext = UiUtilities.getThemedContext(activity, nightMode);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(themedContext);
|
||||
View seekbarView = LayoutInflater.from(themedContext).inflate(R.layout.recalculation_angle_dialog, null, false);
|
||||
builder.setView(seekbarView);
|
||||
builder.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
mode.setStrAngle(angleValue[0]);
|
||||
updateAllSettings();
|
||||
RoutingHelper routingHelper = app.getRoutingHelper();
|
||||
if (mode.equals(routingHelper.getAppMode()) && (routingHelper.isRouteCalculated() || routingHelper.isRouteBeingCalculated())) {
|
||||
routingHelper.recalculateRouteDueToSettingsChange();
|
||||
}
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(R.string.shared_string_cancel, null);
|
||||
|
||||
int selectedModeColor = ContextCompat.getColor(app, mode.getIconColorInfo().getColor(nightMode));
|
||||
setupAngleSlider(angleValue, seekbarView, nightMode, selectedModeColor);
|
||||
builder.show();
|
||||
}
|
||||
|
||||
private static void setupAngleSlider(final float[] angleValue,
|
||||
View seekbarView,
|
||||
final boolean nightMode,
|
||||
final int activeColor) {
|
||||
|
||||
final SeekBar angleBar = seekbarView.findViewById(R.id.angle_seekbar);
|
||||
final TextView angleTv = seekbarView.findViewById(R.id.angle_text);
|
||||
|
||||
angleTv.setText(String.valueOf(angleValue[0]));
|
||||
angleBar.setProgress((int) angleValue[0]);
|
||||
angleBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
int value = progress - (progress % 5);
|
||||
angleValue[0] = value;
|
||||
angleTv.setText(String.valueOf(value));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartTrackingTouch(SeekBar seekBar) {}
|
||||
|
||||
@Override
|
||||
public void onStopTrackingTouch(SeekBar seekBar) {}
|
||||
});
|
||||
UiUtilities.setupSeekBar(angleBar, activeColor, nightMode);
|
||||
}
|
||||
|
||||
private void setupSelectRouteRecalcDistance(PreferenceScreen screen, float defaultAllowedDeviation) {
|
||||
Float[] entryValues;
|
||||
OsmandSettings settings = app.getSettings();
|
||||
|
|
|
@ -251,12 +251,12 @@ public class DownloadedRegionsLayer extends OsmandMapLayer implements IContextMe
|
|||
if (app.getSettings().SHOW_DOWNLOAD_MAP_DIALOG.get()
|
||||
&& zoom >= ZOOM_MIN_TO_SHOW_DOWNLOAD_DIALOG && zoom <= ZOOM_MAX_TO_SHOW_DOWNLOAD_DIALOG
|
||||
&& currentObjects != null) {
|
||||
WorldRegion regionData;
|
||||
|
||||
Map<WorldRegion, BinaryMapDataObject> selectedObjects = new LinkedHashMap<>();
|
||||
for (int i = 0; i < currentObjects.size(); i++) {
|
||||
final BinaryMapDataObject o = currentObjects.get(i);
|
||||
String fullName = osmandRegions.getFullName(o);
|
||||
regionData = osmandRegions.getRegionData(fullName);
|
||||
WorldRegion regionData = osmandRegions.getRegionData(fullName);
|
||||
if (regionData != null && regionData.isRegionMapDownload()) {
|
||||
String regionDownloadName = regionData.getRegionDownloadName();
|
||||
if (regionDownloadName != null) {
|
||||
|
@ -272,8 +272,9 @@ public class DownloadedRegionsLayer extends OsmandMapLayer implements IContextMe
|
|||
|
||||
IndexItem indexItem = null;
|
||||
String name = null;
|
||||
regionData = app.getRegions().getSmallestBinaryMapDataObjectAt(selectedObjects).getKey();
|
||||
if (regionData != null) {
|
||||
Map.Entry<WorldRegion, BinaryMapDataObject> res = app.getRegions().getSmallestBinaryMapDataObjectAt(selectedObjects);
|
||||
if (res != null && res.getKey() != null) {
|
||||
WorldRegion regionData = res.getKey();
|
||||
DownloadIndexesThread downloadThread = app.getDownloadThread();
|
||||
List<IndexItem> indexItems = downloadThread.getIndexes().getIndexItems(regionData);
|
||||
if (indexItems.size() == 0) {
|
||||
|
|
|
@ -10,7 +10,6 @@ import android.graphics.PointF;
|
|||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import net.osmand.binary.RouteDataObject;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.data.RotatedTileBox;
|
||||
|
@ -18,6 +17,7 @@ import net.osmand.plus.OsmandApplication;
|
|||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.helpers.AvoidSpecificRoads;
|
||||
import net.osmand.plus.helpers.AvoidSpecificRoads.AvoidRoadInfo;
|
||||
import net.osmand.plus.helpers.AvoidSpecificRoads.AvoidSpecificRoadsCallback;
|
||||
import net.osmand.plus.views.ContextMenuLayer.ApplyMovedObjectCallback;
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements
|
|||
|
||||
@Override
|
||||
public void onDraw(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) {
|
||||
if (contextMenuLayer.getMoveableObject() instanceof RouteDataObject) {
|
||||
if (contextMenuLayer.getMoveableObject() instanceof AvoidRoadInfo) {
|
||||
PointF pf = contextMenuLayer.getMovableCenterPoint(tileBox);
|
||||
drawPoint(canvas, pf.x, pf.y, true);
|
||||
}
|
||||
|
@ -64,11 +64,11 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements
|
|||
@Override
|
||||
public void onPrepareBufferImage(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) {
|
||||
if (tileBox.getZoom() >= START_ZOOM) {
|
||||
for (Map.Entry<LatLon, RouteDataObject> entry : avoidSpecificRoads.getImpassableRoads().entrySet()) {
|
||||
for (Map.Entry<LatLon, AvoidRoadInfo> entry : avoidSpecificRoads.getImpassableRoads().entrySet()) {
|
||||
LatLon location = entry.getKey();
|
||||
RouteDataObject road = entry.getValue();
|
||||
if (road != null && contextMenuLayer.getMoveableObject() instanceof RouteDataObject) {
|
||||
RouteDataObject object = (RouteDataObject) contextMenuLayer.getMoveableObject();
|
||||
AvoidRoadInfo road = entry.getValue();
|
||||
if (road != null && contextMenuLayer.getMoveableObject() instanceof AvoidRoadInfo) {
|
||||
AvoidRoadInfo object = (AvoidRoadInfo) contextMenuLayer.getMoveableObject();
|
||||
if (object.id == road.id) {
|
||||
continue;
|
||||
}
|
||||
|
@ -146,9 +146,9 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements
|
|||
int compare = getRadiusPoi(tileBox);
|
||||
int radius = compare * 3 / 2;
|
||||
|
||||
for (Map.Entry<LatLon, RouteDataObject> entry : avoidSpecificRoads.getImpassableRoads().entrySet()) {
|
||||
for (Map.Entry<LatLon, AvoidRoadInfo> entry : avoidSpecificRoads.getImpassableRoads().entrySet()) {
|
||||
LatLon location = entry.getKey();
|
||||
RouteDataObject road = entry.getValue();
|
||||
AvoidRoadInfo road = entry.getValue();
|
||||
if (location != null && road != null) {
|
||||
int x = (int) tileBox.getPixXFromLatLon(location.getLatitude(), location.getLongitude());
|
||||
int y = (int) tileBox.getPixYFromLatLon(location.getLatitude(), location.getLongitude());
|
||||
|
@ -163,36 +163,37 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements
|
|||
|
||||
@Override
|
||||
public LatLon getObjectLocation(Object o) {
|
||||
if (o instanceof RouteDataObject) {
|
||||
return avoidSpecificRoads.getLocation((RouteDataObject) o);
|
||||
if (o instanceof AvoidRoadInfo) {
|
||||
AvoidRoadInfo avoidRoadInfo = (AvoidRoadInfo) o;
|
||||
return new LatLon(avoidRoadInfo.latitude, avoidRoadInfo.longitude);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PointDescription getObjectName(Object o) {
|
||||
if (o instanceof RouteDataObject) {
|
||||
RouteDataObject route = (RouteDataObject) o;
|
||||
return new PointDescription(PointDescription.POINT_TYPE_BLOCKED_ROAD, route.getName());
|
||||
if (o instanceof AvoidRoadInfo) {
|
||||
AvoidRoadInfo route = (AvoidRoadInfo) o;
|
||||
return new PointDescription(PointDescription.POINT_TYPE_BLOCKED_ROAD, route.name);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isObjectMovable(Object o) {
|
||||
return o instanceof RouteDataObject;
|
||||
return o instanceof AvoidRoadInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyNewObjectPosition(@NonNull Object o,
|
||||
@NonNull LatLon position,
|
||||
@Nullable final ApplyMovedObjectCallback callback) {
|
||||
if (o instanceof RouteDataObject) {
|
||||
final RouteDataObject object = (RouteDataObject) o;
|
||||
if (o instanceof AvoidRoadInfo) {
|
||||
final AvoidRoadInfo object = (AvoidRoadInfo) o;
|
||||
final OsmandApplication application = activity.getMyApplication();
|
||||
application.getAvoidSpecificRoads().replaceImpassableRoad(activity, object, position, false, new AvoidSpecificRoadsCallback() {
|
||||
@Override
|
||||
public void onAddImpassableRoad(boolean success, RouteDataObject newObject) {
|
||||
public void onAddImpassableRoad(boolean success, AvoidRoadInfo newObject) {
|
||||
if (callback != null) {
|
||||
callback.onApplyMovedObject(success, newObject);
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ import net.osmand.plus.R;
|
|||
import net.osmand.plus.UiUtilities;
|
||||
import net.osmand.plus.mapcontextmenu.other.TrackDetailsMenu;
|
||||
import net.osmand.plus.mapcontextmenu.other.TrackDetailsMenu.TrackChartPoints;
|
||||
import net.osmand.plus.profiles.LocationIcon;
|
||||
import net.osmand.plus.render.RenderingIcons;
|
||||
import net.osmand.plus.routing.RouteCalculationResult;
|
||||
import net.osmand.plus.routing.RouteDirectionInfo;
|
||||
|
@ -319,7 +320,8 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont
|
|||
|
||||
private void drawProjectionPoint(Canvas canvas, double[] projectionXY) {
|
||||
if (projectionIcon == null) {
|
||||
projectionIcon = (LayerDrawable) view.getResources().getDrawable(helper.getSettings().getApplicationMode().getLocationIcon().getIconId());
|
||||
helper.getSettings().getApplicationMode().getLocationIcon();
|
||||
projectionIcon = (LayerDrawable) view.getResources().getDrawable(LocationIcon.DEFAULT.getIconId());
|
||||
}
|
||||
int locationX = (int) projectionXY[0];
|
||||
int locationY = (int) projectionXY[1];
|
||||
|
@ -1146,45 +1148,39 @@ public class RouteLayer extends OsmandMapLayer implements ContextMenuLayer.ICont
|
|||
}
|
||||
|
||||
private double[] calculateProjectionOnRoutePoint(List<Location> routeNodes, RoutingHelper helper, RotatedTileBox box) {
|
||||
double[] projectionXY;
|
||||
boolean visible;
|
||||
Location previousInRoute = null;
|
||||
Location nextInRoute = null;
|
||||
//need to change this code by fixing helper.route.getCurrentRoute() miscalculation
|
||||
// TODO simplifiy all culation!
|
||||
if (helper.getRoute().getIntermediatePointsToPass() > 0) {
|
||||
for (int i = 1; i < routeNodes.size(); i++) {
|
||||
LatLon routePoint = new LatLon(routeNodes.get(i).getLatitude(), routeNodes.get(i).getLongitude());
|
||||
if (routePoint.equals(helper.getIntermediatePoints().get(0))) {
|
||||
previousInRoute = routeNodes.get(i - 1);
|
||||
nextInRoute = routeNodes.get(i);
|
||||
double[] projectionXY = null;
|
||||
Location ll = helper.getLastFixedLocation();
|
||||
RouteCalculationResult route = helper.getRoute();
|
||||
List<Location> locs = route.getImmutableAllLocations();
|
||||
int cr = route.getCurrentRoute();
|
||||
int locIndex = locs.size() - 1;
|
||||
if(route.getIntermediatePointsToPass() > 0) {
|
||||
locIndex = route.getIndexOfIntermediate(route.getIntermediatePointsToPass() - 1);
|
||||
}
|
||||
if(ll != null && cr > 0 && cr < locs.size() && locIndex >= 0 && locIndex < locs.size()) {
|
||||
Location loc1 = locs.get(cr - 1);
|
||||
Location loc2 = locs.get(cr);
|
||||
double distLeft = route.getDistanceFromPoint(cr) - route.getDistanceFromPoint(locIndex);
|
||||
double baDist = route.getDistanceFromPoint(cr - 1) - route.getDistanceFromPoint(cr);
|
||||
Location target = locs.get(locIndex);
|
||||
double dTarget = ll.distanceTo(target);
|
||||
final int aX = box.getPixXFromLonNoRot(loc1.getLongitude());
|
||||
final int aY = box.getPixYFromLatNoRot(loc1.getLatitude());
|
||||
final int bX = box.getPixXFromLonNoRot(loc2.getLongitude());
|
||||
final int bY = box.getPixYFromLatNoRot(loc2.getLatitude());
|
||||
if(baDist != 0) {
|
||||
double CF = (dTarget - distLeft) / baDist;
|
||||
double rX = bX - CF * (bX - aX);
|
||||
double rY = bY - CF * (bY - aY);
|
||||
projectionXY = new double[] {rX, rY};
|
||||
}
|
||||
}
|
||||
} else {
|
||||
previousInRoute = routeNodes.get(routeNodes.size() - 2);
|
||||
nextInRoute = routeNodes.get(routeNodes.size() - 1);
|
||||
}
|
||||
if(projectionXY != null) {
|
||||
|
||||
if (nextInRoute != null && previousInRoute != null) {
|
||||
|
||||
final Location ll = view.getApplication().getLocationProvider().getLastKnownLocation();
|
||||
final int aX = box.getPixXFromLonNoRot(ll.getLongitude());
|
||||
final int aY = box.getPixYFromLatNoRot(ll.getLatitude());
|
||||
final int centerX = box.getPixXFromLonNoRot(nextInRoute.getLongitude());
|
||||
final int centerY = box.getPixYFromLatNoRot(nextInRoute.getLatitude());
|
||||
final int bX = box.getPixXFromLonNoRot(previousInRoute.getLongitude());
|
||||
final int bY = box.getPixYFromLatNoRot(previousInRoute.getLatitude());
|
||||
|
||||
double radius = MapUtils.getVectorMagnitude(centerX, centerY, aX, aY);
|
||||
double angle2 = MapUtils.getAngleForRadiusVector(centerX, centerY, bX, bY);
|
||||
projectionXY = MapUtils.getCoordinatesFromRadiusAndAngle(centerX, centerY, radius, angle2);
|
||||
double distanceLoc2Proj = MapUtils.getVectorMagnitude(aX, aY, (int)projectionXY[0], (int)projectionXY[1]);
|
||||
boolean isProjectionOnSegment = MapUtils.getVectorMagnitude(centerX ,centerY, (int) projectionXY[0], (int) projectionXY[1])
|
||||
< MapUtils.getVectorMagnitude(centerX, centerY, bX, bY);
|
||||
visible = box.containsPoint((float)projectionXY[0], (float)projectionXY[1], 20.0f)
|
||||
&& Math.abs(Math.toDegrees(MapUtils.getAngleBetweenVectors(centerX, centerY, aX, aY, centerX, centerY, bX, bY))) < 90
|
||||
&& distanceLoc2Proj > AndroidUtils.dpToPx(view.getContext(), 52) / 2.0
|
||||
&& isProjectionOnSegment;
|
||||
double distanceLoc2Proj = MapUtils.getSqrtDistance((int)projectionXY[0], (int) projectionXY[1],
|
||||
box.getPixXFromLonNoRot(ll.getLongitude()), box.getPixYFromLatNoRot(ll.getLatitude()));
|
||||
boolean visible = box.containsPoint((float) projectionXY[0], (float) projectionXY[1], 20.0f)
|
||||
&& distanceLoc2Proj > AndroidUtils.dpToPx(view.getContext(), 52) / 2.0;
|
||||
if (visible) {
|
||||
return projectionXY;
|
||||
}
|
||||
|
|
|
@ -1405,8 +1405,7 @@ public class MapInfoWidgetsFactory {
|
|||
ctx.startActivity(Intent.createChooser(intent, ctx.getString(R.string.send_location)));
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, R.color.active_color_primary_dark);
|
||||
AndroidUtils.setSnackbarTextMaxLines(snackbar, 5);
|
||||
UiUtilities.setupSnackbar(snackbar, nightMode, 5);
|
||||
snackbar.show();
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ import android.support.annotation.Nullable;
|
|||
import android.support.v4.app.FragmentActivity;
|
||||
import android.text.Html;
|
||||
import android.util.Log;
|
||||
import android.view.ContextThemeWrapper;
|
||||
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.ResultMatcher;
|
||||
|
@ -86,7 +87,7 @@ public class WikiArticleHelper {
|
|||
activityRef = new WeakReference<>(activity);
|
||||
this.isNightMode = nightMode;
|
||||
this.url = url;
|
||||
dialog = createProgressDialog(activity);
|
||||
dialog = createProgressDialog(activity, isNightMode);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -215,9 +216,9 @@ public class WikiArticleHelper {
|
|||
return "";
|
||||
}
|
||||
|
||||
private static ProgressDialog createProgressDialog(@NonNull FragmentActivity activity) {
|
||||
private static ProgressDialog createProgressDialog(@NonNull FragmentActivity activity, boolean nightMode) {
|
||||
if (activity != null) {
|
||||
ProgressDialog dialog = new ProgressDialog(activity);
|
||||
ProgressDialog dialog = new ProgressDialog(new ContextThemeWrapper(activity, nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme));
|
||||
dialog.setCancelable(false);
|
||||
dialog.setMessage(activity.getString(R.string.wiki_article_search_text));
|
||||
return dialog;
|
||||
|
|
|
@ -204,7 +204,10 @@ public class SavedArticlesRvAdapter extends RecyclerView.Adapter<RecyclerView.Vi
|
|||
ldh.restoreSavedArticle(article);
|
||||
}
|
||||
});
|
||||
AndroidUtils.setSnackbarTextColor(snackbar, R.color.wikivoyage_active_dark);
|
||||
boolean nightMode = !settings.isLightContent();
|
||||
UiUtilities.setupSnackbar(snackbar, nightMode);
|
||||
int wikivoyageActiveColorResId = nightMode ? R.color.wikivoyage_active_dark : R.color.wikivoyage_active_light;
|
||||
UiUtilities.setupSnackbar(snackbar, nightMode, null, null, wikivoyageActiveColorResId, null);
|
||||
snackbar.show();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue