Merge branch 'r3.3' into quickaction_fix_3.3

# Conflicts:
#	OsmAnd/res/values/strings.xml
This commit is contained in:
madwasp79 2019-03-18 10:18:42 +02:00
commit bc94d1a4c7
50 changed files with 2088 additions and 1429 deletions

View file

@ -43,7 +43,10 @@ public class TransportRoute extends MapObject {
}
public List<Way> getForwardWays() {
return forwardWays == null ? Collections.emptyList() : forwardWays;
if(forwardWays == null) {
return Collections.emptyList();
}
return forwardWays;
}

View file

@ -90,7 +90,8 @@ public class GeneralRouter implements VehicleRouter {
CAR,
PEDESTRIAN,
BICYCLE,
BOAT
BOAT,
PUBLIC_TRANSPORT
}
@ -224,7 +225,7 @@ public class GeneralRouter implements VehicleRouter {
return impassableRoads.toArray();
}
private int registerTagValueAttribute(String tag, String value) {
public int registerTagValueAttribute(String tag, String value) {
String key = tag +"$"+value;
if(universalRules.containsKey(key)) {
return universalRules.get(key);
@ -617,6 +618,14 @@ public class GeneralRouter implements VehicleRouter {
return ((Number)o).intValue();
}
public int evaluateInt(BitSet rawTypes, int defValue) {
Object o = evaluate(rawTypes);
if(!(o instanceof Number)){
return defValue;
}
return ((Number)o).intValue();
}
public float evaluateFloat(RouteDataObject ro, float defValue) {
Object o = evaluate(ro);
if(!(o instanceof Number)) {
@ -633,6 +642,14 @@ public class GeneralRouter implements VehicleRouter {
return ((Number)o).floatValue();
}
public float evaluateFloat(BitSet rawTypes, float defValue) {
Object o = evaluate(rawTypes);
if(!(o instanceof Number)){
return defValue;
}
return ((Number)o).floatValue();
}
private BitSet convert(RouteRegion reg, int[] types) {
BitSet b = new BitSet(universalRules.size());
Map<Integer, Integer> map = regionConvert.get(reg);

View file

@ -10,7 +10,7 @@ import java.util.TreeMap;
public class RouteStatistics {
private static final String UNDEFINED_ATTR = "undefined";
public static final String UNDEFINED_ATTR = "undefined";
private final List<RouteSegmentResult> route;
private final RenderingRulesStorage currentRenderer;
@ -354,7 +354,7 @@ public class RouteStatistics {
public String getPropertyName(Boundaries attribute) {
int lowerBoundary = Math.round(attribute.getLowerBoundary());
int upperBoundary = Math.round(attribute.getUpperBoundary());
if (lowerBoundary > Boundaries.MIN_INCLINE) {
if (lowerBoundary >= Boundaries.MIN_DIVIDED_INCLINE) {
lowerBoundary++;
}
return String.format("%d%% ... %d%%", lowerBoundary, upperBoundary);
@ -365,8 +365,13 @@ public class RouteStatistics {
int lowerBoundary = Math.round(attribute.getLowerBoundary());
int upperBoundary = Math.round(attribute.getUpperBoundary());
StringBuilder range = new StringBuilder();
if (lowerBoundary > Boundaries.MIN_INCLINE) {
if (lowerBoundary >= Boundaries.MIN_DIVIDED_INCLINE) {
lowerBoundary++;
} else {
lowerBoundary = Boundaries.MIN_INCLINE;
}
if (upperBoundary > Boundaries.MAX_DIVIDED_INCLINE) {
upperBoundary = Boundaries.MAX_INCLINE;
}
range.append(lowerBoundary);
range.append(upperBoundary < 0 ? "_" : "-");
@ -446,14 +451,17 @@ public class RouteStatistics {
public static class Incline {
private float inclineValue;
private final float inclineValue;
private final float distance;
private final Boundaries boundaries;
private Boundaries boundaries;
public Incline(float inclineValue, float distance) {
this.inclineValue = inclineValue;
this.distance = distance;
this.boundaries = Boundaries.newBoundariesFor(inclineValue);
}
public void computeBoundaries(float minIncline, float maxIncline) {
this.boundaries = Boundaries.newBoundariesFor(inclineValue, minIncline, maxIncline);
}
public float getValue() {
@ -505,16 +513,24 @@ public class RouteStatistics {
this.lowerBoundary = lowerBoundary;
}
public static Boundaries newBoundariesFor(float incline) {
public static Boundaries newBoundariesFor(float incline, float minIncline, float maxIncline) {
int maxRoundedIncline = Math.round(maxIncline);
int minRoundedIncline = Math.round(minIncline);
if (incline > MAX_INCLINE) {
return new Boundaries(MAX_INCLINE, MAX_INCLINE - STEP);
return new Boundaries(MAX_INCLINE, MAX_DIVIDED_INCLINE);
}
if (incline < MIN_INCLINE) {
return new Boundaries(MIN_INCLINE + STEP, MIN_INCLINE);
return new Boundaries(MIN_DIVIDED_INCLINE, MIN_INCLINE);
}
for (int i = 1; i < NUM; i++) {
if (incline >= BOUNDARIES_ARRAY[i - 1] && incline < BOUNDARIES_ARRAY[i]) {
return new Boundaries(BOUNDARIES_ARRAY[i], BOUNDARIES_ARRAY[i - 1]);
if (i == 1) {
return new Boundaries(BOUNDARIES_ARRAY[i], minRoundedIncline);
} else if (i == NUM - 1) {
return new Boundaries(maxRoundedIncline, BOUNDARIES_ARRAY[i - 1]);
} else {
return new Boundaries(BOUNDARIES_ARRAY[i], BOUNDARIES_ARRAY[i - 1]);
}
}
}
return null;

View file

@ -136,7 +136,7 @@ public class RoutingConfiguration {
}
}
private static int parseSilentInt(String t, int v) {
public static int parseSilentInt(String t, int v) {
if (t == null || t.length() == 0) {
return v;
}
@ -144,7 +144,7 @@ public class RoutingConfiguration {
}
private static float parseSilentFloat(String t, float v) {
public static float parseSilentFloat(String t, float v) {
if (t == null || t.length() == 0) {
return v;
}
@ -217,8 +217,8 @@ public class RoutingConfiguration {
String valueDescriptions = parser.getAttributeValue("", "valueDescriptions");
String[] strValues = values.split(",");
Double[] vls = new Double[strValues.length];
for(int i =0; i< vls.length; i++) {
vls[i] =Double.parseDouble(strValues[i].trim());
for (int i = 0; i < vls.length; i++) {
vls[i] = Double.parseDouble(strValues[i].trim());
}
currentRouter.registerNumericParameter(id, name, description, vls ,
valueDescriptions.split(","));

View file

@ -1,16 +1,9 @@
package net.osmand.router;
import net.osmand.Location;
import net.osmand.binary.BinaryMapIndexReader;
import net.osmand.binary.BinaryMapIndexReader.SearchRequest;
import net.osmand.data.LatLon;
import net.osmand.data.QuadRect;
import net.osmand.data.TransportRoute;
import net.osmand.data.TransportSchedule;
import net.osmand.data.TransportStop;
import net.osmand.osm.edit.Node;
import net.osmand.osm.edit.Way;
import net.osmand.util.MapUtils;
import gnu.trove.iterator.TIntIterator;
import gnu.trove.list.array.TIntArrayList;
import gnu.trove.map.hash.TIntObjectHashMap;
import gnu.trove.map.hash.TLongObjectHashMap;
import java.io.IOException;
import java.util.ArrayList;
@ -21,10 +14,16 @@ import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import gnu.trove.iterator.TIntIterator;
import gnu.trove.list.array.TIntArrayList;
import gnu.trove.map.hash.TIntObjectHashMap;
import gnu.trove.map.hash.TLongObjectHashMap;
import net.osmand.binary.BinaryMapIndexReader;
import net.osmand.binary.BinaryMapIndexReader.SearchRequest;
import net.osmand.data.LatLon;
import net.osmand.data.QuadRect;
import net.osmand.data.TransportRoute;
import net.osmand.data.TransportSchedule;
import net.osmand.data.TransportStop;
import net.osmand.osm.edit.Node;
import net.osmand.osm.edit.Way;
import net.osmand.util.MapUtils;
public class TransportRoutePlanner {
@ -39,6 +38,9 @@ public class TransportRoutePlanner {
for(TransportRouteSegment s : endStops) {
endSegments.put(s.getId(), s);
}
if(startStops.size() == 0) {
return Collections.emptyList();
}
PriorityQueue<TransportRouteSegment> queue = new PriorityQueue<TransportRouteSegment>(startStops.size(), new SegmentsComparator(ctx));
for(TransportRouteSegment r : startStops){
r.walkDist = (float) MapUtils.getDistance(r.getLocation(), start);
@ -65,7 +67,7 @@ public class TransportRoutePlanner {
ctx.visitedRoutesCount++;
ctx.visitedSegments.put(segment.getId(), segment);
if (segment.getDepth() > ctx.cfg.maxNumberOfChanges) {
if (segment.getDepth() > ctx.cfg.maxNumberOfChanges + 1) {
continue;
}
if (segment.distFromStart > finishTime + ctx.cfg.finishTimeSeconds ||
@ -77,6 +79,10 @@ public class TransportRoutePlanner {
double minDist = 0;
double travelDist = 0;
double travelTime = 0;
final float routeTravelSpeed = ctx.cfg.getSpeedByRouteType(segment.road.getType());
if(routeTravelSpeed == 0) {
continue;
}
TransportStop prevStop = segment.getStop(segment.segStart);
List<TransportRouteSegment> sgms = new ArrayList<TransportRouteSegment>();
for (int ind = 1 + segment.segStart; ind < segment.getLength(); ind++) {
@ -94,13 +100,14 @@ public class TransportRoutePlanner {
int interval = sc.avgStopIntervals.get(ind - 1);
travelTime += interval * 10;
} else {
travelTime += ctx.cfg.stopTime + segmentDist / ctx.cfg.travelSpeed;
travelTime += ctx.cfg.stopTime + segmentDist / routeTravelSpeed;
}
if(travelDist > finishTime + ctx.cfg.finishTimeSeconds) {
if(segment.distFromStart + travelTime > finishTime + ctx.cfg.finishTimeSeconds) {
break;
}
sgms.clear();
sgms = ctx.getTransportStops(stop.x31, stop.y31, true, sgms);
ctx.visitedStops++;
for (TransportRouteSegment sgm : sgms) {
if (ctx.calculationProgress != null && ctx.calculationProgress.isCancelled) {
return null;
@ -108,31 +115,31 @@ public class TransportRoutePlanner {
if (segment.wasVisited(sgm)) {
continue;
}
TransportRouteSegment rrs = new TransportRouteSegment(sgm);
rrs.parentRoute = segment;
rrs.parentStop = ind;
rrs.walkDist = MapUtils.getDistance(rrs.getLocation(), stop.getLocation());
rrs.parentTravelTime = travelTime;
rrs.parentTravelDist = travelDist;
double walkTime = rrs.walkDist / ctx.cfg.walkSpeed
+ (ctx.cfg.getChangeTime());
rrs.distFromStart = segment.distFromStart + travelTime + walkTime;
TransportRouteSegment nextSegment = new TransportRouteSegment(sgm);
nextSegment.parentRoute = segment;
nextSegment.parentStop = ind;
nextSegment.walkDist = MapUtils.getDistance(nextSegment.getLocation(), stop.getLocation());
nextSegment.parentTravelTime = travelTime;
nextSegment.parentTravelDist = travelDist;
double walkTime = nextSegment.walkDist / ctx.cfg.walkSpeed
+ ctx.cfg.getChangeTime() + ctx.cfg.getBoardingTime();
nextSegment.distFromStart = segment.distFromStart + travelTime + walkTime;
if(ctx.cfg.useSchedule) {
int tm = (sgm.departureTime - ctx.cfg.scheduleTimeOfDay) * 10;
if(tm >= rrs.distFromStart) {
rrs.distFromStart = tm;
queue.add(rrs);
if(tm >= nextSegment.distFromStart) {
nextSegment.distFromStart = tm;
queue.add(nextSegment);
}
} else {
queue.add(rrs);
queue.add(nextSegment);
}
}
TransportRouteSegment f = endSegments.get(segmentId);
TransportRouteSegment finalSegment = endSegments.get(segmentId);
double distToEnd = MapUtils.getDistance(stop.getLocation(), end);
if (f != null && distToEnd < ctx.cfg.walkRadius) {
if (finalSegment != null && distToEnd < ctx.cfg.walkRadius) {
if (finish == null || minDist > distToEnd) {
minDist = distToEnd;
finish = new TransportRouteSegment(f);
finish = new TransportRouteSegment(finalSegment);
finish.parentRoute = segment;
finish.parentStop = ind;
finish.walkDist = distToEnd;
@ -178,7 +185,7 @@ public class TransportRoutePlanner {
ctx.calculationProgress.distanceFromEnd = 0;
ctx.calculationProgress.reverseSegmentQueueSize = 0;
ctx.calculationProgress.directSegmentQueueSize = 0;
float speed = (float) ctx.cfg.travelSpeed + 1; // assume
float speed = (float) ctx.cfg.defaultTravelSpeed + 1; // assume
ctx.calculationProgress.totalEstimatedDistance = (float) (MapUtils.getDistance(start, end) / speed);
}
}
@ -198,9 +205,11 @@ public class TransportRoutePlanner {
private List<TransportRouteResult> prepareResults(TransportRoutingContext ctx, List<TransportRouteSegment> results) {
Collections.sort(results, new SegmentsComparator(ctx));
List<TransportRouteResult> lst = new ArrayList<TransportRouteResult>();
System.out.println(String.format("Calculated %.1f seconds, found %d results, visited %d routes, loaded %d tiles (%d ms read, %d ms total),",
(System.currentTimeMillis() - ctx.startCalcTime) / 1000.0, results.size(), ctx.visitedRoutesCount,
ctx.quadTree.size(), ctx.readTime / (1000 * 1000), ctx.loadTime / (1000 * 1000)));
System.out.println(String.format("Calculated %.1f seconds, found %d results, visited %d routes / %d stops, loaded %d tiles (%d ms read, %d ms total), loaded ways %d (%d wrong)",
(System.currentTimeMillis() - ctx.startCalcTime) / 1000.0, results.size(),
ctx.visitedRoutesCount, ctx.visitedStops,
ctx.quadTree.size(), ctx.readTime / (1000 * 1000), ctx.loadTime / (1000 * 1000),
ctx.loadedWays, ctx.wrongLoadedWays));
for(TransportRouteSegment res : results) {
if (ctx.calculationProgress != null && ctx.calculationProgress.isCancelled) {
return null;
@ -214,9 +223,15 @@ public class TransportRoutePlanner {
return null;
}
if (p.parentRoute != null) {
TransportRouteResultSegment sg = new TransportRouteResultSegment(p.parentRoute.road,
p.parentRoute.segStart, p.parentStop, p.parentRoute.walkDist,
p.departureTime);
TransportRouteResultSegment sg = new TransportRouteResultSegment();
sg.route = p.parentRoute.road;
sg.start = p.parentRoute.segStart;
sg.end = p.parentStop;
sg.walkDist = p.parentRoute.walkDist;
sg.walkTime = sg.walkDist / ctx.cfg.walkSpeed;
sg.depTime = p.departureTime;
sg.travelDistApproximate = p.parentTravelDist;
sg.travelTime = p.parentTravelTime;
route.segments.add(0, sg);
}
p = p.parentRoute;
@ -278,20 +293,19 @@ public class TransportRoutePlanner {
public static class TransportRouteResultSegment {
private static final boolean DISPLAY_FULL_SEGMENT_ROUTE = false;
private static final int DISPLAY_SEGMENT_IND = 0;
public final TransportRoute route;
public final int start;
public final int end;
public final double walkDist ;
public final int depTime;
public TransportRoute route;
public double walkTime;
public double travelDistApproximate;
public double travelTime;
public int start;
public int end;
public double walkDist ;
public int depTime;
public TransportRouteResultSegment(TransportRoute route, int start, int end, double walkDist, int depTime) {
this.route = route;
this.start = start;
this.end = end;
this.walkDist = walkDist;
this.depTime = depTime;
public TransportRouteResultSegment() {
}
public int getArrivalTime() {
@ -312,6 +326,10 @@ public class TransportRoutePlanner {
return -1;
}
public double getTravelTime() {
return travelTime;
}
public TransportStop getStart() {
return route.getForwardStops().get(start);
}
@ -468,24 +486,29 @@ public class TransportRoutePlanner {
}
public double getTravelTime() {
if(cfg.useSchedule) {
int t = 0;
for(TransportRouteResultSegment s : segments) {
double t = 0;
for (TransportRouteResultSegment s : segments) {
if (cfg.useSchedule) {
TransportSchedule sts = s.route.getSchedule();
for (int k = s.start; k < s.end; k++) {
t += sts.getAvgStopIntervals()[k] * 10;
}
} else {
t += cfg.getBoardingTime();
t += s.getTravelTime();
}
return t;
}
return getTravelDist() / cfg.travelSpeed + cfg.stopTime * getStops() +
cfg.getChangeTime() * getChanges();
return t;
}
public double getWalkTime() {
return getWalkDist() / cfg.walkSpeed;
}
public double getChangeTime() {
return cfg.getChangeTime();
}
public int getChanges() {
return segments.size() - 1;
}
@ -534,9 +557,9 @@ public class TransportRoutePlanner {
private static final int SHIFT_DEPTIME = 14; // assume less than 1024 stops
TransportRouteSegment parentRoute = null;
int parentStop;
double parentTravelTime; // travel time
double parentTravelDist; // inaccurate
int parentStop; // last stop to exit for parent route
double parentTravelTime; // travel time for parent route
double parentTravelDist; // travel distance for parent route (inaccurate)
// walk distance to start route location (or finish in case last segment)
double walkDist = 0;
@ -643,6 +666,7 @@ public class TransportRoutePlanner {
// stats
public long startCalcTime;
public int visitedRoutesCount;
public int visitedStops;
public int wrongLoadedWays;
public int loadedWays;
public long loadTime;
@ -685,7 +709,7 @@ public class TransportRoutePlanner {
int by = (sy + d ) >> (31 - cfg.ZOOM_TO_LOAD_TILES);
for(int x = lx; x <= rx; x++) {
for(int y = ty; y <= by; y++) {
int tileId = x << (cfg.ZOOM_TO_LOAD_TILES + 1) + y;
long tileId = (((long)x) << (cfg.ZOOM_TO_LOAD_TILES + 1)) + y;
List<TransportRouteSegment> list = quadTree.get(tileId);
if(list == null) {
list = loadTile(x, y);

View file

@ -1,61 +1,111 @@
package net.osmand.router;
import java.util.BitSet;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
import net.osmand.router.GeneralRouter.RouteAttributeContext;
import net.osmand.router.GeneralRouter.RouteDataObjectAttribute;
public class TransportRoutingConfiguration {
public static final String KEY = "public_transport";
public int ZOOM_TO_LOAD_TILES = 14;
public int ZOOM_TO_LOAD_TILES = 15;
public int walkRadius = 1500; // ? 3000
public int walkChangeRadius = 300;
public double walkSpeed = 3.6 / 3.6; // m/s
public double travelSpeed = 36 / 3.6; // m/s
public int stopTime = 30;
public int changeTime = 300;
public int maxNumberOfChanges = 5;
public int maxNumberOfChanges = 3;
public int finishTimeSeconds = 1200;
public int maxRouteTime = 60 * 60 * 10; // 10 hours
public boolean useSchedule;
public GeneralRouter router;
// cache values from router for fast access
public float walkSpeed = (float) (3.6 / 3.6); // m/s
public float defaultTravelSpeed = (float) (60 / 3.6); // m/s
public int stopTime = 30;
public int changeTime = 180;
public int boardingTime = 180;
public boolean useSchedule;
// 10 seconds based
public int scheduleTimeOfDay = 12 * 60 * 6; // 12:00 - 60*6*12
public int scheduleMaxTime = 50 * 6; // TODO not appropriate variable, should be dynamic
public int scheduleMinChangeTime = 180; // 3 min
// day since 2000
public int scheduleDayNumber;
private Map<String, Integer> rawTypes = new HashMap<String, Integer>();
private Map<String, Float> speed = new TreeMap<String, Float>();
public float getSpeedByRouteType(String routeType) {
Float sl = speed.get(routeType);
if(sl == null) {
RouteAttributeContext spds = router.getObjContext(RouteDataObjectAttribute.ROAD_SPEED);
sl = spds.evaluateFloat(getRawBitset("route", routeType), defaultTravelSpeed);
speed.put(routeType, sl);
}
return sl.floatValue();
}
private int getRawType(String tg, String vl) {
String key = tg + "$"+vl;
if(!rawTypes.containsKey(key)) {
int at = router.registerTagValueAttribute(tg, vl);
rawTypes.put(key, at);
}
return rawTypes.get(key);
}
private BitSet getRawBitset(String tg, String vl) {
BitSet bs = new BitSet();
bs.set(getRawType(tg, vl));
return bs;
}
public int getChangeTime() {
return useSchedule ? scheduleMinChangeTime : changeTime;
return useSchedule ? 0 : changeTime;
}
public int getBoardingTime() {
return boardingTime;
}
public TransportRoutingConfiguration(RoutingConfiguration.Builder builder) {
GeneralRouter router = builder == null ? null : builder.getRouter("public_transport");
if(router != null) {
this(builder, new TreeMap<String, String>());
}
public TransportRoutingConfiguration(RoutingConfiguration.Builder builder, Map<String, String> params) {
GeneralRouter prouter = builder == null ? null : builder.getRouter("public_transport");
if(prouter != null) {
this.router = prouter.build(params);
walkRadius = router.getIntAttribute("walkRadius", walkRadius);
walkChangeRadius = router.getIntAttribute("walkChangeRadius", walkRadius);
walkChangeRadius = router.getIntAttribute("walkChangeRadius", walkChangeRadius);
ZOOM_TO_LOAD_TILES = router.getIntAttribute("zoomToLoadTiles", ZOOM_TO_LOAD_TILES);
maxNumberOfChanges = router.getIntAttribute("maxNumberOfChanges", maxNumberOfChanges);
maxRouteTime = router.getIntAttribute("maxRouteTime", maxRouteTime);
finishTimeSeconds = router.getIntAttribute("delayForAlternativesRoutes", finishTimeSeconds);
String mn = params.get("max_num_changes");
maxNumberOfChanges = RoutingConfiguration.parseSilentInt(mn, maxNumberOfChanges);
walkSpeed = router.getFloatAttribute("minDefaultSpeed", this.walkSpeed * 3.6f) / 3.6f;
defaultTravelSpeed = router.getFloatAttribute("maxDefaultSpeed", this.defaultTravelSpeed * 3.6f) / 3.6f;
RouteAttributeContext obstacles = router.getObjContext(RouteDataObjectAttribute.ROUTING_OBSTACLES);
stopTime = obstacles.evaluateInt(getRawBitset("time", "stop"), stopTime);
changeTime = obstacles.evaluateInt(getRawBitset("time", "change"), changeTime);
boardingTime = obstacles.evaluateInt(getRawBitset("time", "boarding"), boardingTime);
RouteAttributeContext spds = router.getObjContext(RouteDataObjectAttribute.ROAD_SPEED);
walkSpeed = spds.evaluateFloat(getRawBitset("route", "walk"), walkSpeed);
travelSpeed = router.getFloatAttribute("defaultTravelSpeed", (float) travelSpeed);
walkSpeed = router.getFloatAttribute("defaultWalkSpeed", (float) walkSpeed);
stopTime = router.getIntAttribute("defaultStopTime", stopTime);
changeTime = router.getIntAttribute("defaultChangeTime", changeTime);
scheduleMinChangeTime = router.getIntAttribute("defaultScheduleChangeTime", changeTime);
}
}

View file

@ -858,8 +858,8 @@ public class SearchUICore {
return cmp;
}
}
int st1 = Algorithms.extractFirstIntegerNumber(o1.localeName);
int st2 = Algorithms.extractFirstIntegerNumber(o2.localeName);
int st1 = o1.localeName == null ? -10000 : Algorithms.extractFirstIntegerNumber(o1.localeName);
int st2 = o2.localeName == null ? -10000 : Algorithms.extractFirstIntegerNumber(o2.localeName);
if (st1 != st2) {
return Algorithms.compare(st1, st2);
}

View file

@ -112,6 +112,7 @@ public class MapUtils {
}
/**
* Gets distance in meters
*/

View file

@ -14,4 +14,5 @@
<string name="si_km_m">Kilometry/metry</string>
<string name="si_nm">Námořní míle</string>
<string name="si_mi_meters">Míle/metry</string>
<string name="nm">nmi</string>
</resources>

View file

@ -66,6 +66,16 @@ android {
warningsAsErrors false
}
bundle {
language {
// Specifies that the app bundle should not support
// configuration APKs for language resources. These
// resources are instead packaged with each base and
// dynamic feature APK.
enableSplit = false
}
}
// related to kuromoji
//packagingOptions {
// exclude '/META-INF/CONTRIBUTORS.md'

View file

@ -53,7 +53,7 @@
<com.github.mikephil.charting.charts.HorizontalBarChart
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="60dp" />
android:layout_height="@dimen/route_info_chart_height" />
<LinearLayout
android:id="@+id/route_items"

View file

@ -587,7 +587,7 @@
<string name="local_openstreetmap_were_uploaded">{0} POI/الملاحظات تم رفعها</string>
<string name="live_monitoring_url_descr">تحديد عنوان ويب مع بناء جملة المعلمة: اللات = {0}، خط الطول = {1}، والطابع الزمني = {2}، HDOP = {3}، {4 ارتفاع =}، والسرعة = {5}، واضعة = {6}.</string>
<string name="gpx_monitoring_disabled_warn">سجل المسار عن طريق ويدجت GPX أو عن طريق إعدادات \'تسجيل الرحلة\'.</string>
<string name="free_version_message">يمكنك تحميل أو تحديث الخرائط s$%1.</string>
<string name="free_version_message">يمكنك تحميل أو تحديث الخرائط %1$s</string>
<string name="poi_context_menu_showdescription">اظهار وصف POI.</string>
<string name="index_name_other">خرائط عالمية حسب الموضوع</string>
<string name="index_name_wiki">في جميع أنحاء العالم ويكيبيديا النقاط المهمة</string>
@ -2814,4 +2814,37 @@
<string name="quick_action_gpx_tracks_show">إظهار مسارات GPX</string>
<string name="add_destination_query">الرجاء إضافة الوجهة أولا</string>
<string name="previous_route">المسار السابق</string>
<string name="add_start_and_end_points">إضافة نقاط بداية ونهاية</string>
<string name="route_add_start_point">إضافة نقطة البدء</string>
<string name="route_descr_select_start_point">حدد نقطة البداية</string>
<string name="rendering_attr_surface_unpaved_name">طريق غير معبد</string>
<string name="rendering_attr_surface_sand_name">الرمال</string>
<string name="rendering_attr_surface_grass_name">عشب</string>
<string name="rendering_attr_surface_grass_paver_name">مرصف العشب</string>
<string name="rendering_attr_surface_ground_name">الأرض</string>
<string name="rendering_attr_surface_dirt_name">تراب</string>
<string name="rendering_attr_surface_mud_name">وحل</string>
<string name="rendering_attr_surface_ice_name">جليد</string>
<string name="rendering_attr_surface_salt_name">الملح</string>
<string name="rendering_attr_surface_snow_name">ثلج</string>
<string name="rendering_attr_surface_asphalt_name">الأسفلت</string>
<string name="rendering_attr_surface_paved_name">طريق معبد</string>
<string name="rendering_attr_surface_concrete_name">خرسانة</string>
<string name="rendering_attr_surface_cobblestone_name">حصى تعبيد الطرق</string>
<string name="rendering_attr_surface_paving_stones_name">حجارة الرصف</string>
<string name="rendering_attr_surface_stone_name">حجر</string>
<string name="rendering_attr_surface_metal_name">معدن</string>
<string name="rendering_attr_surface_wood_name">الخشب</string>
<string name="rendering_attr_surface_gravel_name">الحصى</string>
<string name="rendering_attr_surface_fine_gravel_name">حصى دقيق</string>
<string name="rendering_attr_surface_compacted_name">مضغوط</string>
<string name="rendering_attr_smoothness_excellent_name">ممتاز</string>
<string name="rendering_attr_smoothness_good_name">جيد</string>
<string name="rendering_attr_smoothness_intermediate_name">متوسط</string>
<string name="rendering_attr_smoothness_bad_name">سيئ</string>
<string name="rendering_attr_smoothness_very_bad_name">سيء جدًا</string>
<string name="rendering_attr_smoothness_horrible_name">فظيع</string>
<string name="rendering_attr_smoothness_very_horrible_name">رهيب جداً</string>
<string name="rendering_attr_smoothness_impassable_name">غير سالك</string>
<string name="rendering_attr_highway_class_motorway_name">الطريق السريع</string>
</resources>

View file

@ -894,7 +894,7 @@
<string name="fav_points_not_exist">Улюбёныя месцы адсутнічаюць</string>
<string name="update_existing">Замяніць</string>
<string name="only_show">Паказаць маршрут</string>
<string name="follow">Пачаць навігацыю</string>
<string name="follow">Пачаць кіраванне</string>
<string name="mark_final_location_first">Спачатку абярыце пункт прызначэння</string>
<string name="get_directions">Навігацыя</string>
<string name="opening_hours">Гадзіны працы</string>
@ -1495,7 +1495,7 @@
<string name="shared_string_my_favorites">Улюбёныя</string>
<string name="confirmation_to_clear_history">Ачысціць гісторыю\?</string>
<string name="delay_to_start_navigation_descr">Задайце час затрымкі на экране планавання маршруту.</string>
<string name="delay_to_start_navigation">Пачаць пакрокавую навігацыю праз…</string>
<string name="delay_to_start_navigation">Пачаць пакрокавае кіраванне праз…</string>
<string name="shared_string_go">Рушым</string>
<string name="local_osm_changes_upload_all_confirm">Вы збіраецеся адаслаць %1$d змен у OSM. Вы ўпэўнены\?</string>
<string name="plugin_ski_descr">Убудова для OsmAnd дае вам доступ да даных аб гарналыжных трасах, маршрутах для бегавых лыж, альпійскіх спусках, фунікулёрах і гарналыжных пад\'ёмніках. Маршруты і спускі пазначаюцца рознымі колерамі ў залежнасці ад іх складанасці і намаляваныя з выкарыстаннем адмысловага «зімовага» стылю мапы, адметнага тым, што выкарыстоўваюцца «снежныя» колеры зімовага пейзажу.
@ -2923,7 +2923,7 @@
<string name="sit_on_the_stop">Пасадка на прыпынку</string>
<string name="shared_string_swap">Памяняць</string>
<string name="show_more">Паказаць больш</string>
<string name="tracks_on_map">Сляды на мапе</string>
<string name="tracks_on_map">Адлюстроўваемыя сляды</string>
<string name="quick_action_show_hide_gpx_tracks">Паказаць/схаваць GPX-сляды</string>
<string name="quick_action_show_hide_gpx_tracks_descr">Націск на кнопку дзеяння пакажа ці схавае абраныя GPX-сляды на мапе</string>
<string name="quick_action_gpx_tracks_hide">Схаваць GPX-сляды</string>
@ -2947,4 +2947,44 @@
\n • Выдалена аналітыка Facebook і Firebase са свабоднай версіі (OsmAnd+ не ўключае яе)
\n
\n</string>
<string name="transfers_size">%1$d перасадак</string>
<string name="add_start_and_end_points">Дадаць пачатковы пункт і пункт прызначэння</string>
<string name="route_add_start_point">Дадаць пачатковы пункт</string>
<string name="route_descr_select_start_point">Абраць пачатковы пункт</string>
<string name="rendering_attr_surface_unpaved_name">Без пакрыцця</string>
<string name="rendering_attr_surface_sand_name">Пясок</string>
<string name="rendering_attr_surface_grass_name">Трава</string>
<string name="rendering_attr_surface_ground_name">Глеба</string>
<string name="rendering_attr_surface_dirt_name">Бруд</string>
<string name="rendering_attr_surface_mud_name">Іл</string>
<string name="rendering_attr_surface_ice_name">Лёд</string>
<string name="rendering_attr_surface_salt_name">Соль</string>
<string name="rendering_attr_surface_snow_name">Снег</string>
<string name="rendering_attr_surface_asphalt_name">Асфальт</string>
<string name="rendering_attr_surface_paved_name">Брукаваная</string>
<string name="rendering_attr_surface_concrete_name">Бетон</string>
<string name="rendering_attr_surface_sett_name">Брук</string>
<string name="rendering_attr_surface_cobblestone_name">Брукавец</string>
<string name="rendering_attr_surface_paving_stones_name">Плітка</string>
<string name="rendering_attr_surface_pebblestone_name">Галька</string>
<string name="rendering_attr_surface_stone_name">Камень</string>
<string name="rendering_attr_surface_metal_name">Метал</string>
<string name="rendering_attr_surface_wood_name">Дрэва</string>
<string name="rendering_attr_surface_gravel_name">Жвір</string>
<string name="rendering_attr_surface_fine_gravel_name">Шматпластовы жвір</string>
<string name="rendering_attr_surface_compacted_name">Утрамбавана</string>
<string name="rendering_attr_smoothness_excellent_name">Выдатная</string>
<string name="rendering_attr_smoothness_good_name">Добрая</string>
<string name="rendering_attr_smoothness_intermediate_name">Сярэдняя</string>
<string name="rendering_attr_smoothness_bad_name">Дрэнная</string>
<string name="rendering_attr_smoothness_very_bad_name">Вельмі дрэнная</string>
<string name="rendering_attr_smoothness_horrible_name">Жудасная</string>
<string name="rendering_attr_smoothness_very_horrible_name">Вельмі жудасная</string>
<string name="rendering_attr_smoothness_impassable_name">Непраходная</string>
<string name="rendering_attr_highway_class_motorway_name">Аўтастрада</string>
<string name="rendering_attr_highway_class_road_name">Дарога</string>
<string name="rendering_attr_highway_class_street_name">Вуліца</string>
<string name="rendering_attr_highway_class_footway_name">Ходнік</string>
<string name="rendering_attr_highway_class_cycleway_name">Роварная дарожка</string>
<string name="rendering_attr_undefined_name">Нявызначана</string>
</resources>

View file

@ -2962,4 +2962,48 @@ Abasta l\'àrea: %1$s x %2$s</string>
\n</string>
<string name="use_osm_live_public_transport_description">Activa les modificacions del transport públic amb OsmAnd Live.</string>
<string name="use_osm_live_public_transport">Transport públic a OsmAnd Live</string>
<string name="public_transport_warning_descr_blog">Teniu més informació sobre com OsmAnd calcula les rutes al nostre blog.</string>
<string name="public_transport_warning_title">El càlcul de rutes amb transport públic està en fase de proves beta, essent possibles errors i defectes.</string>
<string name="add_intermediate">Afegeix un punt intermedi</string>
<string name="transfers_size">%1$d trasllats</string>
<string name="add_start_and_end_points">Afegeix punts inicial i final</string>
<string name="route_add_start_point">Afegeix punt de sortida</string>
<string name="route_descr_select_start_point">Selecciona punt de sortida</string>
<string name="rendering_attr_surface_unpaved_name">Sense asfaltar</string>
<string name="rendering_attr_surface_sand_name">Sorra</string>
<string name="rendering_attr_surface_grass_name">Gespa</string>
<string name="rendering_attr_surface_grass_paver_name">Gespa i paviment</string>
<string name="rendering_attr_surface_ground_name">Terra</string>
<string name="rendering_attr_surface_mud_name">Fangar</string>
<string name="rendering_attr_surface_ice_name">Gel</string>
<string name="rendering_attr_surface_salt_name">Sal</string>
<string name="rendering_attr_surface_snow_name">Neu</string>
<string name="rendering_attr_surface_asphalt_name">Asfalt</string>
<string name="rendering_attr_surface_paved_name">Pavimentat</string>
<string name="rendering_attr_surface_concrete_name">Formigó</string>
<string name="rendering_attr_surface_sett_name">Llambordí</string>
<string name="rendering_attr_surface_pebblestone_name">Còdol</string>
<string name="rendering_attr_surface_stone_name">Pedra</string>
<string name="rendering_attr_surface_metal_name">Metall</string>
<string name="rendering_attr_surface_wood_name">Fusta</string>
<string name="rendering_attr_surface_gravel_name">Grava</string>
<string name="rendering_attr_surface_fine_gravel_name">Graveta</string>
<string name="rendering_attr_surface_compacted_name">Compactat</string>
<string name="rendering_attr_smoothness_excellent_name">Excel·lent</string>
<string name="rendering_attr_smoothness_good_name">Bona</string>
<string name="rendering_attr_smoothness_intermediate_name">Intermèdia</string>
<string name="rendering_attr_smoothness_bad_name">Dolenta</string>
<string name="rendering_attr_smoothness_very_bad_name">Molt dolenta</string>
<string name="rendering_attr_smoothness_horrible_name">Horrible</string>
<string name="rendering_attr_smoothness_very_horrible_name">Molt horrible</string>
<string name="rendering_attr_smoothness_impassable_name">Intransitable</string>
<string name="rendering_attr_highway_class_motorway_name">Autopista</string>
<string name="rendering_attr_highway_class_state_road_name">Carretera estatal</string>
<string name="rendering_attr_highway_class_road_name">Carretera</string>
<string name="rendering_attr_highway_class_street_name">Carrer</string>
<string name="rendering_attr_highway_class_service_name">Servei</string>
<string name="rendering_attr_highway_class_track_name">Pista</string>
<string name="rendering_attr_highway_class_steps_name">Escales</string>
<string name="rendering_attr_highway_class_path_name">Camí</string>
<string name="rendering_attr_undefined_name">Indefinit</string>
</resources>

View file

@ -504,7 +504,7 @@
<string name="fav_points_not_exist">Žádná Oblíbená místa nejsou zadána</string>
<string name="update_existing">Nahradit</string>
<string name="only_show">Pouze zobrazit</string>
<string name="follow">Následovat</string>
<string name="follow">Spustit navádění</string>
<string name="recalculate_route_to_your_location">Způsob dopravy:</string>
<string name="mark_final_location_first">Prosím zadejte nejprve cíl</string>
<string name="get_directions">Navigace</string>
@ -2890,7 +2890,7 @@ Zobrazená oblast: %1$s x %2$s</string>
<string name="route_smoothness_stat_container">Hladkost povrchu</string>
<string name="route_steepness_stat_container">Strmost</string>
<string name="show_more">Ukaž více</string>
<string name="tracks_on_map">Stopy na mapě</string>
<string name="tracks_on_map">Zobrazené trasy</string>
<string name="time_of_day">Denní doba</string>
<string name="step_by_step">Krok za krokem</string>
<string name="road_types">Typy silnic</string>
@ -2900,4 +2900,55 @@ Zobrazená oblast: %1$s x %2$s</string>
<string name="quick_action_show_hide_gpx_tracks_descr">Klepnutím na toto tlačítko akce se zobrazí nebo skryjí vybrané GPX trasy na mapě</string>
<string name="quick_action_gpx_tracks_hide">Skrýt GPX trasy</string>
<string name="quick_action_gpx_tracks_show">Zobrazit GPX trasy</string>
<string name="transfers_size">%1$d přenosů</string>
<string name="add_start_and_end_points">Přidat počáteční a koncový bod</string>
<string name="route_add_start_point">Přidat počáteční bod</string>
<string name="route_descr_select_start_point">Zvolit počáteční bod</string>
<string name="rendering_attr_surface_unpaved_name">Nezpevněný</string>
<string name="rendering_attr_surface_sand_name">Písek</string>
<string name="rendering_attr_surface_grass_name">Tráva</string>
<string name="rendering_attr_surface_grass_paver_name">Zatravňovací dlažba</string>
<string name="rendering_attr_surface_ground_name">Zem</string>
<string name="rendering_attr_surface_dirt_name">Hlína</string>
<string name="rendering_attr_surface_mud_name">Bláto</string>
<string name="rendering_attr_surface_ice_name">Led</string>
<string name="rendering_attr_surface_salt_name">Sůl</string>
<string name="rendering_attr_surface_snow_name">Sníh</string>
<string name="rendering_attr_surface_asphalt_name">Asfalt</string>
<string name="rendering_attr_surface_paved_name">Zpevněný</string>
<string name="rendering_attr_surface_concrete_name">Beton</string>
<string name="rendering_attr_surface_sett_name">Dlažební kostky</string>
<string name="rendering_attr_surface_cobblestone_name">Kočičí hlavy</string>
<string name="rendering_attr_surface_paving_stones_name">Zámková dlažba</string>
<string name="rendering_attr_surface_pebblestone_name">Oblázky</string>
<string name="rendering_attr_surface_stone_name">Kámen</string>
<string name="rendering_attr_surface_metal_name">Kov</string>
<string name="rendering_attr_surface_wood_name">Dřevo</string>
<string name="rendering_attr_surface_gravel_name">Štěrk</string>
<string name="rendering_attr_surface_fine_gravel_name">Jemný štěrk</string>
<string name="rendering_attr_surface_compacted_name">Zhutněný</string>
<string name="rendering_attr_smoothness_excellent_name">Vynikající</string>
<string name="rendering_attr_smoothness_good_name">Dobrá</string>
<string name="rendering_attr_smoothness_intermediate_name">Střední</string>
<string name="rendering_attr_smoothness_bad_name">Špatná</string>
<string name="rendering_attr_smoothness_very_bad_name">Velmi špatná</string>
<string name="rendering_attr_smoothness_horrible_name">Hrozná</string>
<string name="rendering_attr_smoothness_very_horrible_name">Velmi hrozná</string>
<string name="rendering_attr_smoothness_impassable_name">Nesjízdná</string>
<string name="rendering_attr_highway_class_motorway_name">Dálnice</string>
<string name="rendering_attr_highway_class_state_road_name">Státní silnice</string>
<string name="rendering_attr_highway_class_road_name">Cesta</string>
<string name="rendering_attr_highway_class_street_name">Ulice</string>
<string name="rendering_attr_highway_class_service_name">Dopravní obsluha</string>
<string name="rendering_attr_highway_class_footway_name">Chodník</string>
<string name="rendering_attr_highway_class_track_name">Polní cesta</string>
<string name="rendering_attr_highway_class_bridleway_name">Cesta pro koně</string>
<string name="rendering_attr_highway_class_steps_name">Schody</string>
<string name="rendering_attr_highway_class_path_name">Pěšina</string>
<string name="rendering_attr_highway_class_cycleway_name">Cyklostezka</string>
<string name="rendering_attr_undefined_name">Neurčené</string>
<string name="use_osm_live_public_transport_description">Povolit použití změn z OsmAnd Live pro veřejnou dopravu.</string>
<string name="use_osm_live_public_transport">Hromadná doprava z OsmAnd Live</string>
<string name="by_transport_type">Pomocí %1$s</string>
<string name="sit_on_the_stop">Nastupte na zastávce</string>
</resources>

View file

@ -2949,4 +2949,39 @@ Repræsenterer område: %1$s x %2$s</string>
\n  • Fjernet Facebook og Firebase analytics fra den gratis version (OsmAnd + indeholder dem ikke)</string>
<string name="use_osm_live_public_transport_description">Aktiver offentlig transport for OsmAnd Live ændringer.</string>
<string name="use_osm_live_public_transport">OsmAnd Live offentlig transport</string>
<string name="add_start_and_end_points">Tilføj start- og slutpunkter</string>
<string name="route_add_start_point">Tilføj startpunkt</string>
<string name="route_descr_select_start_point">Vælg startpunkt</string>
<string name="rendering_attr_surface_sand_name">Sand</string>
<string name="rendering_attr_surface_grass_name">Græs</string>
<string name="rendering_attr_surface_grass_paver_name">Befæstet græs</string>
<string name="rendering_attr_surface_mud_name">Mudder</string>
<string name="rendering_attr_surface_ice_name">Is</string>
<string name="rendering_attr_surface_salt_name">Salt</string>
<string name="rendering_attr_surface_snow_name">Sne</string>
<string name="rendering_attr_surface_asphalt_name">Asfalt</string>
<string name="rendering_attr_surface_concrete_name">Beton</string>
<string name="rendering_attr_surface_stone_name">Sten</string>
<string name="rendering_attr_surface_metal_name">Metal</string>
<string name="rendering_attr_surface_wood_name">Træ</string>
<string name="rendering_attr_surface_gravel_name">Grus</string>
<string name="rendering_attr_surface_fine_gravel_name">Fint grus</string>
<string name="rendering_attr_surface_compacted_name">Komprimeret</string>
<string name="rendering_attr_smoothness_good_name">God</string>
<string name="rendering_attr_smoothness_intermediate_name">Mellem</string>
<string name="rendering_attr_smoothness_bad_name">Dårlig</string>
<string name="rendering_attr_smoothness_very_bad_name">Meget dårlig</string>
<string name="rendering_attr_highway_class_motorway_name">Motorvej</string>
<string name="rendering_attr_highway_class_road_name">Vej</string>
<string name="rendering_attr_highway_class_street_name">Gade</string>
<string name="rendering_attr_highway_class_footway_name">Fortov</string>
<string name="rendering_attr_highway_class_track_name">Spor</string>
<string name="rendering_attr_highway_class_bridleway_name">Ridesti</string>
<string name="rendering_attr_highway_class_path_name">Sti</string>
<string name="rendering_attr_highway_class_cycleway_name">Cykelsti</string>
<string name="rendering_attr_undefined_name">Ikke defineret</string>
<string name="public_transport_warning_descr_blog">Læs mere om hvordan OsmAnd beregner ruter på vores blog.</string>
<string name="public_transport_warning_title">Offentlig transportruter er nu i beta testfasen, så fejl og unøjagtigheder kan forekomme.</string>
<string name="add_intermediate">Tilføje mellemliggende punkt</string>
<string name="transfers_size">%1$d overførsler</string>
</resources>

View file

@ -3563,4 +3563,19 @@
<string name="poi_generator_source_biomass">Energiequelle: Biomasse</string>
<string name="poi_health_specialty_radiotheraphy_yes">Strahlentherapie</string>
<string name="poi_hazard">Gefahr</string>
<string name="poi_rtsa_scale_filter">Schwierigkeitsklasse</string>
<string name="poi_rtsa_scale_nc">н/к</string>
<string name="poi_rtsa_scale_nc_asterisk">н/к*</string>
<string name="poi_rtsa_scale_1a">1A</string>
<string name="poi_rtsa_scale_1a_asterisk">1А*</string>
<string name="poi_rtsa_scale_1b"></string>
<string name="poi_rtsa_scale_1b_asterisk">1Б*</string>
<string name="poi_rtsa_scale_2a">2А</string>
<string name="poi_rtsa_scale_2a_asterisk">2А*</string>
<string name="poi_rtsa_scale_2b"></string>
<string name="poi_rtsa_scale_2b_asterisk">2Б*</string>
<string name="poi_rtsa_scale_3a">3А</string>
<string name="poi_rtsa_scale_3a_asterisk">3А*</string>
<string name="poi_rtsa_scale_3b"></string>
<string name="poi_rtsa_scale_3b_asterisk">3Б*</string>
</resources>

View file

@ -2935,4 +2935,54 @@ Abgedeckte Fläche: %1$s x %2$s</string>
<string name="sit_on_the_stop">Zusteigen an Haltestelle</string>
<string name="use_osm_live_public_transport_description">Öffentliche Verkehrsmittel für Änderungen an OsmAnd Live aktivieren.</string>
<string name="use_osm_live_public_transport">OsmAnd Live öffentliche Verkehrsmittel</string>
</resources>
<string name="public_transport_warning_descr_blog">Erfahren Sie mehr darüber, wie OsmAnd Routen berechnet, in unserem Blog.</string>
<string name="public_transport_warning_title">Öffentliche Verkehrsrouten sind jetzt in der Beta-Testphase, so dass Fehler und Ungenauigkeiten auftreten können.</string>
<string name="add_intermediate">Zwischenpunkt hinzufügen</string>
<string name="transfers_size">%1$d überträgt</string>
<string name="add_start_and_end_points">Start- und Endpunkte hinzufügen</string>
<string name="route_add_start_point">Startpunkt hinzufügen</string>
<string name="route_descr_select_start_point">Startpunkt auswählen</string>
<string name="rendering_attr_surface_unpaved_name">Unbefestigt</string>
<string name="rendering_attr_surface_sand_name">Sand</string>
<string name="rendering_attr_surface_grass_name">Gras</string>
<string name="rendering_attr_surface_grass_paver_name">Rasengittersteine</string>
<string name="rendering_attr_surface_ground_name">Naturbelassen</string>
<string name="rendering_attr_surface_dirt_name">Erde</string>
<string name="rendering_attr_surface_mud_name">Schlamm</string>
<string name="rendering_attr_surface_ice_name">Eis</string>
<string name="rendering_attr_surface_salt_name">Salz</string>
<string name="rendering_attr_surface_snow_name">Schnee</string>
<string name="rendering_attr_surface_asphalt_name">Asphalt</string>
<string name="rendering_attr_surface_paved_name">Befestigt</string>
<string name="rendering_attr_surface_concrete_name">Beton</string>
<string name="rendering_attr_surface_sett_name">Pflastersteine</string>
<string name="rendering_attr_surface_cobblestone_name">Kopfsteinpflaster</string>
<string name="rendering_attr_surface_paving_stones_name">Pflastersteine</string>
<string name="rendering_attr_surface_pebblestone_name">Kieselsteine</string>
<string name="rendering_attr_surface_stone_name">Stein</string>
<string name="rendering_attr_surface_metal_name">Metal</string>
<string name="rendering_attr_surface_wood_name">Holz</string>
<string name="rendering_attr_surface_gravel_name">Schotter</string>
<string name="rendering_attr_surface_fine_gravel_name">Feiner Kies</string>
<string name="rendering_attr_surface_compacted_name">Verdichtet</string>
<string name="rendering_attr_smoothness_excellent_name">Hervorragend</string>
<string name="rendering_attr_smoothness_good_name">Gut</string>
<string name="rendering_attr_smoothness_intermediate_name">Mittel</string>
<string name="rendering_attr_smoothness_bad_name">Schlecht</string>
<string name="rendering_attr_smoothness_very_bad_name">Sehr schlecht</string>
<string name="rendering_attr_smoothness_horrible_name">Schrecklich</string>
<string name="rendering_attr_smoothness_very_horrible_name">Grauenhaft</string>
<string name="rendering_attr_smoothness_impassable_name">Unpassierbar</string>
<string name="rendering_attr_highway_class_motorway_name">Autobahn</string>
<string name="rendering_attr_highway_class_state_road_name">Staatsstraßen</string>
<string name="rendering_attr_highway_class_road_name">Straße</string>
<string name="rendering_attr_highway_class_street_name">Straße</string>
<string name="rendering_attr_highway_class_service_name">Dienstleistung</string>
<string name="rendering_attr_highway_class_footway_name">Gehweg</string>
<string name="rendering_attr_highway_class_track_name">Wirtschaftsweg</string>
<string name="rendering_attr_highway_class_bridleway_name">Reitweg</string>
<string name="rendering_attr_highway_class_steps_name">Stufen</string>
<string name="rendering_attr_highway_class_path_name">Pfad</string>
<string name="rendering_attr_highway_class_cycleway_name">Radweg</string>
<string name="rendering_attr_undefined_name">Nicht definiert</string>
</resources>

View file

@ -68,7 +68,7 @@ Lon %2$s</string>
<string name="shared_string_off">No</string>
<string name="shared_string_enabled">Activado</string>
<string name="shared_string_disabled">Desactivado</string>
<string name="shared_string_selected">Marcado(s)</string>
<string name="shared_string_selected">Seleccionado</string>
<string name="shared_string_selected_lowercase">marcado(s)</string>
<string name="shared_string_never">Nunca</string>
<string name="shared_string_and">y</string>
@ -2992,4 +2992,7 @@ Lon %2$s</string>
<string name="rendering_attr_highway_class_path_name">Sendero</string>
<string name="rendering_attr_highway_class_cycleway_name">Ciclovía / Bicisenda</string>
<string name="rendering_attr_undefined_name">Indefinido</string>
<string name="public_transport_warning_descr_blog">Conozca más sobre cómo OsmAnd calcula las rutas en nuestro blog.</string>
<string name="public_transport_warning_title">Las rutas de transporte público se encuentran ahora en la fase de pruebas beta, por lo que pueden producirse errores e imprecisiones.</string>
<string name="add_intermediate">Añadir punto intermedio</string>
</resources>

View file

@ -2993,4 +2993,7 @@ Lon %2$s</string>
<string name="rendering_attr_highway_class_path_name">Sendero</string>
<string name="rendering_attr_highway_class_cycleway_name">Ciclovía / Bicisenda</string>
<string name="rendering_attr_undefined_name">Indefinido</string>
<string name="public_transport_warning_descr_blog">Conozca más sobre cómo OsmAnd calcula las rutas en nuestro blog.</string>
<string name="public_transport_warning_title">Las rutas de transporte público se encuentran ahora en la fase de pruebas beta, por lo que pueden producirse errores e imprecisiones.</string>
<string name="add_intermediate">Añadir punto intermedio</string>
</resources>

View file

@ -3032,4 +3032,7 @@
<string name="rendering_attr_highway_class_path_name">Sendero</string>
<string name="rendering_attr_highway_class_cycleway_name">Ciclovía / Bicisenda</string>
<string name="rendering_attr_undefined_name">Indefinido</string>
<string name="public_transport_warning_descr_blog">Conozca más sobre cómo OsmAnd calcula las rutas en nuestro blog.</string>
<string name="public_transport_warning_title">Las rutas de transporte público se encuentran ahora en la fase de pruebas beta, por lo que pueden producirse errores e imprecisiones.</string>
<string name="add_intermediate">Añadir punto intermedio</string>
</resources>

View file

@ -987,7 +987,7 @@
<string name="poi_surface_paved">سطح: روسازی‌شده</string>
<string name="poi_surface_asphalt">سطح: آسفالت</string>
<string name="poi_surface_concrete">سطح: بتن</string>
<string name="poi_surface_sett">سطح: سنگفرش سنگی</string>
<string name="poi_surface_sett">سطح: سنگفرش کوبیک</string>
<string name="poi_surface_cobblestone">سطح: قلوه‌سنگ</string>
<string name="poi_surface_paving_stones">سطح: سنگ‌فرش</string>
<string name="poi_surface_pebblestone">سطح: ریگ</string>
@ -1295,4 +1295,5 @@
<string name="poi_public_bookcase">قفسه کتاب عمومی</string>
<string name="poi_fire_hydrant_position_street">خیابان</string>
<string name="poi_post_street">خیابان</string>
<string name="poi_surface_fine_gravel">سطح: شن ریز</string>
</resources>

View file

@ -342,7 +342,7 @@
<string name="search_position_current_location_found">موقعیت من (پیدا‌شده)</string>
<string name="search_position_address">نشانی…</string>
<string name="search_position_favorites">نقاط برگزیده…</string>
<string name="search_position_undefined">تعریف‌نشده</string>
<string name="search_position_undefined">نامشخص</string>
<string name="delete_confirmation_msg">آیا %1$s حذف شود؟</string>
<string name="city_type_suburb">حومه</string>
<string name="city_type_hamlet">دهکده</string>
@ -1872,7 +1872,7 @@
<string name="rendering_value_light_brown_name">قهوه‌ای روشن</string>
<string name="rendering_value_dark_brown_name">قهوه‌ای تیره</string>
<string name="rendering_attr_contourColorScheme_name">رنگ‌بندی منحنی‌های تراز</string>
<string name="rendering_attr_surfaceIntegrity_name">سلامت سطح جاده</string>
<string name="rendering_attr_surfaceIntegrity_name">یکپارچگی سطح جاده‌ها</string>
<string name="search_hint">نام شهر، نشانی یا نام POI را بنویسید</string>
<string name="edit_filter">ویرایش دسته‌ها</string>
<string name="subcategories">زیردسته‌ها</string>
@ -2997,6 +2997,40 @@
<string name="rendering_attr_surface_asphalt_name">آسفالت</string>
<string name="rendering_attr_surface_paved_name">روسازی‌شده</string>
<string name="rendering_attr_surface_concrete_name">بتن</string>
<string name="rendering_attr_surface_sett_name">سنگفرش سنگی</string>
<string name="rendering_attr_surface_cobblestone_name">قلوه‌سنگ</string>
<string name="rendering_attr_surface_sett_name">سنگفرش کوبیک</string>
<string name="rendering_attr_surface_cobblestone_name">سنگفرش سنگی</string>
<string name="rendering_attr_surface_grass_name">چمن</string>
<string name="rendering_attr_surface_grass_paver_name">کفپوش چمن‌دار</string>
<string name="rendering_attr_surface_paving_stones_name">سنگفرش</string>
<string name="rendering_attr_surface_pebblestone_name">ریگ</string>
<string name="rendering_attr_surface_stone_name">سنگ</string>
<string name="rendering_attr_surface_metal_name">فلز</string>
<string name="rendering_attr_surface_wood_name">چوب</string>
<string name="rendering_attr_surface_gravel_name">شن</string>
<string name="rendering_attr_surface_fine_gravel_name">شن ریز</string>
<string name="rendering_attr_surface_compacted_name">فشرده</string>
<string name="rendering_attr_smoothness_excellent_name">عالی</string>
<string name="rendering_attr_smoothness_good_name">خوب</string>
<string name="rendering_attr_smoothness_intermediate_name">متوسط</string>
<string name="rendering_attr_smoothness_bad_name">بد</string>
<string name="rendering_attr_smoothness_very_bad_name">خیلی بد</string>
<string name="rendering_attr_smoothness_horrible_name">افتضاح</string>
<string name="rendering_attr_smoothness_very_horrible_name">خیلی افتضاح</string>
<string name="rendering_attr_smoothness_impassable_name">غیرقابل‌عبور</string>
<string name="rendering_attr_highway_class_motorway_name">آزادراه</string>
<string name="rendering_attr_highway_class_street_name">خیابان</string>
<string name="public_transport_warning_descr_blog">برای آشنایی با روش محاسبهٔ مسیر در OsmAnd وبلاگ ما را ببینید.</string>
<string name="public_transport_warning_title">هم‌اکنون مسیرهای ارائه‌شده برای حمل‌ونقل عمومی در فاز آزمایشی است و ممکن است خطاها و نقایصی داشته باشد.</string>
<string name="add_intermediate">افزودن نقطهٔ میانی</string>
<string name="rendering_attr_surface_sand_name">ماسه</string>
<string name="rendering_attr_surface_ground_name">زمین</string>
<string name="rendering_attr_highway_class_road_name">جاده</string>
<string name="rendering_attr_highway_class_service_name">خدماتی</string>
<string name="rendering_attr_highway_class_footway_name">راه پیاده</string>
<string name="rendering_attr_highway_class_track_name">رد</string>
<string name="rendering_attr_highway_class_bridleway_name">راه اسب‌رو</string>
<string name="rendering_attr_highway_class_steps_name">پلکان</string>
<string name="rendering_attr_highway_class_path_name">راهچه</string>
<string name="rendering_attr_highway_class_cycleway_name">راه دوچرخه</string>
<string name="rendering_attr_undefined_name">نامشخص</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -2264,4 +2264,49 @@ Jos pidät OsmAndista ja OSMsta ja haluat tukea niitä, on tämä täydellinen t
<string name="how_to_open_wiki_title">Kuinka avata Wikipedia artikkelit?</string>
<string name="thank_you_for_feedback">Kiitos palautteesta</string>
<string name="add_start_and_end_points">Lisää lähtö- ja maalipisteet</string>
<string name="route_add_start_point">Lisää lähtöpiste</string>
<string name="route_descr_select_start_point">Valitse lähtöpiste</string>
<string name="rendering_attr_surface_unpaved_name">Päällystämätön</string>
<string name="rendering_attr_surface_sand_name">Hiekka</string>
<string name="rendering_attr_surface_grass_name">Ruoho</string>
<string name="rendering_attr_surface_ice_name">Jää</string>
<string name="rendering_attr_surface_salt_name">Suola</string>
<string name="rendering_attr_surface_snow_name">Lumi</string>
<string name="rendering_attr_surface_asphalt_name">Asfaltti</string>
<string name="rendering_attr_surface_paved_name">Päällystetty</string>
<string name="rendering_attr_surface_concrete_name">Betoni</string>
<string name="rendering_attr_surface_cobblestone_name">Mukulakivi</string>
<string name="rendering_attr_surface_paving_stones_name">Kivetty</string>
<string name="rendering_attr_surface_pebblestone_name">Mukulakivi</string>
<string name="rendering_attr_surface_stone_name">Kivi</string>
<string name="rendering_attr_surface_metal_name">Metalli</string>
<string name="rendering_attr_surface_wood_name">Puu</string>
<string name="rendering_attr_surface_gravel_name">Sora</string>
<string name="rendering_attr_surface_fine_gravel_name">Hiekka</string>
<string name="rendering_attr_surface_compacted_name">Tiivistetty</string>
<string name="rendering_attr_smoothness_excellent_name">Erinomainen</string>
<string name="rendering_attr_smoothness_good_name">Hyvä</string>
<string name="rendering_attr_smoothness_intermediate_name">Tyydyttävä</string>
<string name="rendering_attr_smoothness_bad_name">Huono</string>
<string name="rendering_attr_smoothness_very_bad_name">Erittäin huono</string>
<string name="rendering_attr_smoothness_horrible_name">Hirvittävä</string>
<string name="rendering_attr_smoothness_very_horrible_name">Aivan kamala</string>
<string name="rendering_attr_smoothness_impassable_name">Läpipääsemätön</string>
<string name="rendering_attr_highway_class_motorway_name">Moottoritie</string>
<string name="rendering_attr_highway_class_state_road_name">Valtatie</string>
<string name="rendering_attr_highway_class_road_name">Maantie</string>
<string name="rendering_attr_highway_class_street_name">Katu</string>
<string name="rendering_attr_highway_class_service_name">Palvelu</string>
<string name="rendering_attr_highway_class_footway_name">Jalkakäytävä</string>
<string name="rendering_attr_highway_class_track_name">Polku</string>
<string name="rendering_attr_highway_class_bridleway_name">Ratsutie</string>
<string name="rendering_attr_highway_class_steps_name">Portaat</string>
<string name="rendering_attr_highway_class_path_name">Polku</string>
<string name="rendering_attr_highway_class_cycleway_name">Pyörätie</string>
<string name="rendering_attr_undefined_name">Määrittelemätön</string>
<string name="road_types">Tietyypit</string>
<string name="shared_string_swap">Muuta</string>
<string name="show_more">Näytä lisää</string>
<string name="tracks_on_map">Näytä jäljet</string>
<string name="quick_action_show_hide_gpx_tracks">Näytä/piilota GPX jäljet</string>
</resources>

View file

@ -1869,7 +1869,7 @@ Mémoire proportionnelle %4$s Mo (limite Android %5$s Mo, Dalvik %6$s Mo).</stri
Cette opération requiert temporairement {3} Mo et {1} Mo seront utilisés de manière permanente.
Actuellement seuls {2} Mo sont disponibles.</string>
<string name="download_files_question_space_with_temp">Souhaitez-vous télécharger {0} fichier(s) ? Cette opération requiert temporairement {3} Mo et {1} Mo seront utilisés de manière permanente (actuellement l\'espace disponible est de {2} Mo)</string>
<string name="donations">Donations</string>
<string name="donations">Dons</string>
<string name="number_of_recipients">Nombre de destinataires</string>
<string name="osm_live_subscribe_btn">S\'abonner</string>
<string name="osm_live_month_cost">Coût mensuel</string>
@ -1931,7 +1931,7 @@ Si vous appréciez OsmAnd et OSM et que vous souhaitez soutenir ces projets, c\'
<string name="access_category_choice">Sélectionnez une catégorie</string>
<string name="access_hint_enter_name">Saisissez un nom</string>
<string name="access_hint_enter_category">Saisissez une catégorie</string>
<string name="access_hint_enter_description">Saisissez une description</string>
<string name="access_hint_enter_description">Saisissez une description.</string>
<string name="access_collapsed_list">Plier la liste</string>
<string name="access_expanded_list">Liste dépliée</string>
<string name="access_empty_list">Vider la liste</string>
@ -1942,7 +1942,7 @@ Si vous appréciez OsmAnd et OSM et que vous souhaitez soutenir ces projets, c\'
<string name="access_smart_autoannounce">Annonces intelligentes</string>
<string name="access_smart_autoannounce_descr">Annoncer uniquement lorsque la direction de la destination est modifiée.</string>
<string name="access_autoannounce_period">Fréquence des annonces</string>
<string name="access_autoannounce_period_descr">Durée minimum entre deux annonces</string>
<string name="access_autoannounce_period_descr">Durée minimum entre deux annonces.</string>
<string name="access_no_destination">Aucune destination définie</string>
<string name="map_widget_magnetic_bearing">Cap magnétique</string>
<string name="map_widget_bearing">Cap relatif</string>
@ -1950,7 +1950,7 @@ Si vous appréciez OsmAnd et OSM et que vous souhaitez soutenir ces projets, c\'
<string name="access_disable_offroute_recalc_descr">Ne pas calculer de nouvel itinéraire lorsque vous quittez l\'itinéraire prévu.</string>
<string name="access_disable_wrong_direction_recalc_descr">Ne pas calculer de nouvel itinéraire lorsque vous faites demi-tour.</string>
<string name="access_disable_wrong_direction_recalc">Ne pas recalculer l\'itinéraire lors d\'un demi-tour</string>
<string name="use_osm_live_routing_description">Activer la navigation OsmAnd Live</string>
<string name="use_osm_live_routing_description">Activer la navigation avec les données OsmAnd Live.</string>
<string name="use_osm_live_routing">Navigation OsmAnd Live</string>
<string name="follow_us">Suivez-nous</string>
<!-- string name="lat_lon_pattern">Lat. : %1$.5f Lon. : %2$.5f</string -->
@ -1961,8 +1961,8 @@ Si vous appréciez OsmAnd et OSM et que vous souhaitez soutenir ces projets, c\'
<string name="change_markers_position">Déplacer la marque</string>
<string name="lang_es_us">Espagnol (américain)</string>
<string name="lang_en_gb">Anglais (Royaume-Uni)</string>
<string name="access_direction_audio_feedback_descr">Indiquer la direction de la cible par des sons</string>
<string name="access_direction_haptic_feedback_descr">Indiquer la direction de la cible par des vibrations</string>
<string name="access_direction_audio_feedback_descr">Indiquer la direction de la cible par des sons.</string>
<string name="access_direction_haptic_feedback_descr">Indiquer la direction de la cible par des vibrations.</string>
<string name="access_direction_audio_feedback">Indication de la direction par sons</string>
<string name="access_direction_haptic_feedback">Indication de la direction par vibrations</string>
<string name="lang_be_by">Biélorusse (Latin)</string>
@ -1973,7 +1973,7 @@ Si vous appréciez OsmAnd et OSM et que vous souhaitez soutenir ces projets, c\'
<string name="lang_kn">Kannada</string>
<string name="access_shared_string_navigate_up">Monter</string>
<string name="coords_format">Format des coordonnées</string>
<string name="coords_format_descr">Format des coordonnées géographiques</string>
<string name="coords_format_descr">Format des coordonnées géographiques.</string>
<string name="storage_directory_card">Carte mémoire</string>
<string name="shared_string_is_open_24_7">Ouvert 24/7</string>
<string name="map_widget_search">Rechercher</string>
@ -1996,7 +1996,7 @@ Si vous appréciez OsmAnd et OSM et que vous souhaitez soutenir ces projets, c\'
<string name="shared_string_change">Modifier</string>
<string name="get_started">Démarrer</string>
<string name="routing_attr_short_way_name">Trajet économe en carburant</string>
<string name="routing_attr_short_way_description">Suivre un trajet économe en carburant (habituellement plus court)</string>
<string name="routing_attr_short_way_description">Suivre un trajet économe en carburant (habituellement plus court).</string>
<string name="no_update_info_desc">Ne pas vérifier les mises à jour ni les offres promotionnelles OsmAnd.</string>
<string name="no_update_info">Ne pas afficher les nouvelles versions</string>
<string name="skip_map_downloading">Ignorer le téléchargement des cartes</string>
@ -2311,7 +2311,7 @@ représentant la zone : %1$s x %2$s</string>
<string name="edit_name">Modifier le nom</string>
<string name="save_poi_too_many_uppercase">Le nom contient beaucoup de majuscules. Souhaitez-vous continuer ?</string>
<string name="routing_attr_allow_private_name">Autoriser les accès privés</string>
<string name="routing_attr_allow_private_description">Autoriser l\'accès aux zones privées</string>
<string name="routing_attr_allow_private_description">Autoriser l\'accès aux zones privées.</string>
<string name="display_zoom_level">Niveau de zoom de l\'affichage : %1$s</string>
<string name="srtm_color_scheme">Couleur du thème</string>
<string name="show_from_zoom_level">Afficher à partir du niveau de zoom</string>
@ -2745,7 +2745,7 @@ représentant la zone : %1$s x %2$s</string>
<string name="paid_app">Application payante</string>
<string name="paid_plugin">Greffon payant</string>
<string name="popular_destinations">Destinations populaires</string>
<string name="welcome_to_open_beta_description">"Les guides de voyage sappuient sur Wikivoyage. Durant la phase bêta, évaluez toutes les fonctionnalités gratuitement. Par la suite, les guides de voyage seront accessibles aux abonnés OsmAnd ainsi qu\'aux propriétaires d\'OsmAnd+. "</string>
<string name="welcome_to_open_beta_description">"Les guides de voyage sappuient sur Wikivoyage. Durant la phase bêta, évaluez toutes les fonctionnalités gratuitement. Par la suite, les guides de voyage seront accessibles aux abonnés de OsmAnd illimité ainsi qu\'aux propriétaires d\'OsmAnd+. "</string>
<string name="wiki_article_search_text">Recherche de l\'article Wiki correspondant</string>
<string name="osmand_team">Équipe OsmAnd</string>
<string name="maps_you_need_descr">D\'après les articles que vous avez marqué comme favori, nous vous conseillons de télécharger les cartes suivantes :</string>
@ -2804,8 +2804,8 @@ représentant la zone : %1$s x %2$s</string>
<string name="increase_search_radius_to">Augmenter le rayon de recherche à %1$s</string>
<string name="thank_you_for_feedback">Merci pour vos retours</string>
<string name="poi_cannot_be_found">Nœud ou Route introuvable.</string>
<string name="search_no_results_feedback">Aucun résultat pour cette recherche ?
\nSignalez-le nous.</string>
<string name="search_no_results_feedback">Aucun résultat pour cette recherche \?
\nSignalez-le nous</string>
<string name="test_voice_desrc">Appuyez sur un bouton pour écoutez l\'annonce vocale correspondante afin d\'identifier les annonces erronées ou manquantes.</string>
<string name="release_3_2_pre">• Correction du plantage au démarrage survenant pour certains appareils
\n
@ -2945,4 +2945,13 @@ représentant la zone : %1$s x %2$s</string>
<string name="rendering_attr_highway_class_path_name">Chemin</string>
<string name="rendering_attr_highway_class_cycleway_name">Voie cyclable</string>
<string name="rendering_attr_undefined_name">Non défini</string>
<string name="rendering_attr_surface_grass_paver_name">Mélange d\'herbe et de pavés</string>
<string name="rendering_attr_surface_sett_name">Pavés taillés</string>
<string name="rendering_attr_surface_cobblestone_name">Pavés</string>
<string name="rendering_attr_surface_paving_stones_name">Pavés réguliers</string>
<string name="rendering_attr_surface_pebblestone_name">Galets</string>
<string name="rendering_attr_surface_compacted_name">Compacté</string>
<string name="public_transport_warning_descr_blog">Pour savoir comment OsmAnd calcule les routes, visitez notre blog.</string>
<string name="public_transport_warning_title">Les itinéraires en transport public sont actuellement en phase de test. Des erreurs ou des imprécisions peuvent avoir lieu.</string>
<string name="add_intermediate">Ajouter un point intermédiaire</string>
</resources>

View file

@ -688,7 +688,7 @@
<string name="fav_points_not_exist">לא קיימות נקודות מועדפות</string>
<string name="update_existing">החלפה</string>
<string name="only_show">להציג בלבד</string>
<string name="follow">לעקוב</string>
<string name="follow">התחלת הנחייה</string>
<string name="mark_final_location_first">נא לבחור את היעד תחילה</string>
<string name="get_directions">הכוונה</string>
<string name="opening_hours">שעות הפתיחה</string>
@ -2442,7 +2442,7 @@
<string name="select_waypoints_category_description">ניתן להוסיף את כל נקודות הדרך של המסלול או לבחור בקטגוריות נפרדות.</string>
<string name="shared_string_total">סך הכול</string>
<string name="rendering_attr_whiteWaterSports_name">ספורט מים אתגרי</string>
<string name="delay_to_start_navigation">התחלת ניווט מונחה לאחר…</string>
<string name="delay_to_start_navigation">התחלת ניווט צעד אחד צעד לאחר…</string>
<string name="osmand_parking_overdue">תפוגה</string>
<string name="nautical_renderer">ימי</string>
<string name="use_two_digits_longitude">שתי ספרות לציון קו אורך</string>
@ -2909,7 +2909,7 @@
<string name="add_destination_query">נא להוסיף יעד תחילה</string>
<string name="shared_string_swap">החלפה</string>
<string name="show_more">הצגת עוד</string>
<string name="tracks_on_map">עקבות על המפה</string>
<string name="tracks_on_map">עקבות מוצגים</string>
<string name="time_of_day">השעה ביום</string>
<string name="by_transport_type">עם %1$s</string>
<string name="step_by_step">שלב אחר שלב</string>
@ -2921,4 +2921,27 @@
<string name="quick_action_gpx_tracks_show">הצגת מסלולי GPX</string>
<string name="use_osm_live_public_transport_description">הפעלת תחבורה ציבורית לשינויים ב־OsmAnd החי.</string>
<string name="use_osm_live_public_transport">OsmAnd חי תחבורה ציבורית</string>
<string name="transfers_size">%1$d העברות</string>
<string name="add_start_and_end_points">הוספת נקודות התחלה וסיום</string>
<string name="route_add_start_point">הוספת נקודת התחלה</string>
<string name="route_descr_select_start_point">בחירת נקודת התחלה</string>
<string name="rendering_attr_surface_unpaved_name">בלתי סלול</string>
<string name="rendering_attr_surface_sand_name">חול</string>
<string name="rendering_attr_surface_grass_name">דשא</string>
<string name="rendering_attr_surface_grass_paver_name">אבן דשא</string>
<string name="rendering_attr_surface_ground_name">קרקע</string>
<string name="rendering_attr_surface_mud_name">בוץ</string>
<string name="rendering_attr_surface_ice_name">קרח</string>
<string name="rendering_attr_surface_salt_name">מלח</string>
<string name="rendering_attr_surface_snow_name">שלג</string>
<string name="rendering_attr_surface_asphalt_name">אספלט</string>
<string name="rendering_attr_surface_paved_name">סלול</string>
<string name="rendering_attr_surface_concrete_name">בטון</string>
<string name="rendering_attr_surface_paving_stones_name">אבני ריצוף</string>
<string name="rendering_attr_surface_pebblestone_name">חלוקי נחל</string>
<string name="rendering_attr_surface_stone_name">אבן</string>
<string name="rendering_attr_surface_metal_name">מתכת</string>
<string name="rendering_attr_surface_wood_name">עץ</string>
<string name="rendering_attr_surface_gravel_name">חצץ</string>
<string name="rendering_attr_surface_fine_gravel_name">שומשום</string>
</resources>

View file

@ -3545,4 +3545,19 @@
<string name="poi_generator_source_biomass">Orkugjafi: lífmassi</string>
<string name="poi_health_specialty_radiotheraphy_yes">Geislameðferð</string>
<string name="poi_hazard">Lífshætta</string>
<string name="poi_rtsa_scale_filter">Erfiðleikastig</string>
<string name="poi_rtsa_scale_nc">н/к</string>
<string name="poi_rtsa_scale_nc_asterisk">н/к*</string>
<string name="poi_rtsa_scale_1a">1А</string>
<string name="poi_rtsa_scale_1a_asterisk">1А*</string>
<string name="poi_rtsa_scale_1b">1B</string>
<string name="poi_rtsa_scale_1b_asterisk">1B*</string>
<string name="poi_rtsa_scale_2a">2А</string>
<string name="poi_rtsa_scale_2a_asterisk">2А*</string>
<string name="poi_rtsa_scale_2b">2B</string>
<string name="poi_rtsa_scale_2b_asterisk">2B*</string>
<string name="poi_rtsa_scale_3a">3A</string>
<string name="poi_rtsa_scale_3a_asterisk">3A*</string>
<string name="poi_rtsa_scale_3b">3B</string>
<string name="poi_rtsa_scale_3b_asterisk">3B*</string>
</resources>

View file

@ -2927,7 +2927,7 @@ Stendur fyrir svæði: %1$s x %2$s</string>
<string name="add_destination_query">Bættu fyrst við áfangastað</string>
<string name="shared_string_swap">Býtta</string>
<string name="show_more">Sýna meira</string>
<string name="tracks_on_map">Ferlar á kortinu</string>
<string name="tracks_on_map">Birtir ferlar</string>
<string name="time_of_day">Tími dagsins</string>
<string name="by_transport_type">Eftir %1$s</string>
<string name="step_by_step">Skref fyrir skref</string>
@ -2956,4 +2956,54 @@ Stendur fyrir svæði: %1$s x %2$s</string>
\n</string>
<string name="use_osm_live_public_transport_description">Virkja breytingar á almenningssamgöngum í OsmAnd Live.</string>
<string name="use_osm_live_public_transport">Almenningssamgöngur OsmAnd Live</string>
<string name="public_transport_warning_descr_blog">Lærðu meira á blogginu okkar um hvernig OsmAnd reiknar leiðir.</string>
<string name="public_transport_warning_title">Leiðir almenningssamgangna eru nú í lokaprófunum, þannig að búast má við einhverjum villum og ónákvæmni.</string>
<string name="add_intermediate">Bæta við millipunkti</string>
<string name="transfers_size">%1$d millifærslur</string>
<string name="add_start_and_end_points">Bæta við upphafs- og endapunktum</string>
<string name="route_add_start_point">Bæta við upphafspunkti</string>
<string name="route_descr_select_start_point">Veldu upphafspunkt</string>
<string name="rendering_attr_surface_unpaved_name">Óbundið slitlag</string>
<string name="rendering_attr_surface_sand_name">Sandur</string>
<string name="rendering_attr_surface_grass_name">Gras</string>
<string name="rendering_attr_surface_grass_paver_name">Grassteinar</string>
<string name="rendering_attr_surface_ground_name">Jarðvegsyfirborð</string>
<string name="rendering_attr_surface_dirt_name">Mold</string>
<string name="rendering_attr_surface_mud_name">Leðja</string>
<string name="rendering_attr_surface_ice_name">Ís</string>
<string name="rendering_attr_surface_salt_name">Salt</string>
<string name="rendering_attr_surface_snow_name">Snjór</string>
<string name="rendering_attr_surface_asphalt_name">Asfalt</string>
<string name="rendering_attr_surface_paved_name">Bundið slitlag</string>
<string name="rendering_attr_surface_concrete_name">Steinsteypt</string>
<string name="rendering_attr_surface_sett_name">Steinlagt</string>
<string name="rendering_attr_surface_cobblestone_name">Götusteinar</string>
<string name="rendering_attr_surface_paving_stones_name">Hellusteinar</string>
<string name="rendering_attr_surface_pebblestone_name">Steinvölur</string>
<string name="rendering_attr_surface_stone_name">Steinn</string>
<string name="rendering_attr_surface_metal_name">Málmur</string>
<string name="rendering_attr_surface_wood_name">Viður</string>
<string name="rendering_attr_surface_gravel_name">Möl</string>
<string name="rendering_attr_surface_fine_gravel_name">Fín möl</string>
<string name="rendering_attr_surface_compacted_name">Þjappað</string>
<string name="rendering_attr_smoothness_excellent_name">Frábært</string>
<string name="rendering_attr_smoothness_good_name">Gott</string>
<string name="rendering_attr_smoothness_intermediate_name">Miðlungs</string>
<string name="rendering_attr_smoothness_bad_name">Slæmt</string>
<string name="rendering_attr_smoothness_very_bad_name">Mjög slæmt</string>
<string name="rendering_attr_smoothness_horrible_name">Hörmulegt</string>
<string name="rendering_attr_smoothness_very_horrible_name">Hryllingur</string>
<string name="rendering_attr_smoothness_impassable_name">Ófært</string>
<string name="rendering_attr_highway_class_motorway_name">Hraðbraut</string>
<string name="rendering_attr_highway_class_state_road_name">Þjóðvegur</string>
<string name="rendering_attr_highway_class_road_name">Vegur</string>
<string name="rendering_attr_highway_class_street_name">Gata</string>
<string name="rendering_attr_highway_class_service_name">Þjónusta</string>
<string name="rendering_attr_highway_class_footway_name">Gangstétt</string>
<string name="rendering_attr_highway_class_track_name">Slóð</string>
<string name="rendering_attr_highway_class_bridleway_name">Reiðstígur</string>
<string name="rendering_attr_highway_class_steps_name">Þrep</string>
<string name="rendering_attr_highway_class_path_name">Stígur</string>
<string name="rendering_attr_highway_class_cycleway_name">Hjólastígur</string>
<string name="rendering_attr_undefined_name">Óskilgreint</string>
</resources>

View file

@ -291,8 +291,8 @@
<string name="poi_canal">運河(Canal)</string>
<string name="poi_pier">桟橋(Pier)</string>
<string name="poi_surveillance">監視区域(Surveillance)</string>
<string name="poi_observatory">観測台(Observatory)</string>
<string name="poi_astronomical_observatory">天文</string>
<string name="poi_observatory">観測</string>
<string name="poi_astronomical_observatory">天文観測所</string>
<string name="poi_tower">塔(Tower)</string>
<string name="poi_mast">柱(Mast)</string>
<string name="poi_radar">レーダー(Radar)</string>
@ -1983,9 +1983,9 @@
<string name="poi_telescope_type_gamma">ガンマ線望遠鏡</string>
<string name="poi_telescope_diameter">直径(メートル)</string>
<string name="poi_telescope_spectrum">周波数帯</string>
<string name="poi_telescope_usage_research">研究用途</string>
<string name="poi_telescope_usage_espionage">諜報用途</string>
<string name="poi_telescope_usage_education">教育用途</string>
<string name="poi_telescope_usage_research">用途:研究</string>
<string name="poi_telescope_usage_espionage">用途:諜報活動</string>
<string name="poi_telescope_usage_education">用途:教育</string>
<string name="poi_telescope">望遠鏡</string>
<string name="poi_observatory_designation">観測ドーム</string>
<string name="poi_animal_training_type">動物訓練施設の種類</string>
@ -1999,8 +1999,8 @@
<string name="poi_service_bicycle_charging_yes">充電可</string>
<string name="poi_service_bicycle_charging_no">充電不可</string>
<string name="poi_cuisine_suki">タイスキ・スキーヤキー(Suki)</string>
<string name="poi_observatory_type_gravitational">重力観測</string>
<string name="poi_observatory_type_meteorological">気象観測</string>
<string name="poi_observatory_type_gravitational">重力観測</string>
<string name="poi_observatory_type_meteorological">気象観測</string>
<string name="poi_recycling_accepted_waste">受け入れ廃棄物</string>
<string name="poi_recycling_type">リサイクル品受付方法</string>
<string name="poi_shelter_type">日除け、雨よけ小屋の種類</string>
@ -3039,4 +3039,67 @@
<string name="poi_fire_hydrant_pressure">消火栓の圧力</string>
<string name="poi_fire_hydrant_count">消火栓数</string>
<string name="poi_fire_hydrant_flow_capacity">消火栓の放水流量</string>
<string name="poi_fire_hydrant_style_wsh">消火栓タイプ:特殊なデザイン</string>
<string name="poi_street_cabinet_power">キャビネットの種類:配電関連</string>
<string name="poi_street_cabinet_telecom">キャビネットの種類:電話関連</string>
<string name="poi_street_cabinet_cable_tv">キャビネットの種類:ケーブルテレビ関連</string>
<string name="poi_street_cabinet_gas">キャビネットの種類:都市ガス関連</string>
<string name="poi_street_cabinet_postal_service">キャビネットの種類:郵便物関連</string>
<string name="poi_street_cabinet_waste">キャビネットの種類:私的ごみ箱</string>
<string name="poi_street_cabinet_water_management">キャビネットの種類:水道管理機器関連</string>
<string name="poi_street_cabinet_street_lighting">キャビネットの種類:道路照明関連</string>
<string name="poi_depth">対象物の深さ</string>
<string name="poi_salt_yes">塩水</string>
<string name="poi_salt_no">淡水</string>
<string name="poi_aerodrome_type_international">国際空港</string>
<string name="poi_aerodrome_type_regional">地域飛行場</string>
<string name="poi_aerodrome_type_public">公共用飛行場</string>
<string name="poi_aerodrome_type_military">軍用飛行場</string>
<string name="poi_aerodrome_type_military_public">軍/公共兼用飛行場</string>
<string name="poi_aerodrome_type_private">プライベート飛行場</string>
<string name="poi_valley_balka">平底谷、床谷</string>
<string name="poi_pump_type_beam_pump">ポンプ種:ポンプジャック、ビームポンプ</string>
<string name="poi_pump_type_india_mk_2_3">ポンプ種:India Mark IIまたはIII</string>
<string name="poi_pump_type_gravity">ポンプ種:重力(水槌/水撃)ポンプ</string>
<string name="poi_pump_style_modern">ポンプ種:現代的</string>
<string name="poi_pump_style_historic">ポンプ種:歴史的</string>
<string name="poi_pump_status_ok">ポンプ状態:使用可</string>
<string name="poi_pump_status_broken">ポンプ状態:破損</string>
<string name="poi_pump_status_locked">ポンプ状態:施錠</string>
<string name="poi_observatory_type_espionage">用途:諜報活動</string>
<string name="poi_voltage">電圧</string>
<string name="poi_display_yes">表示:可</string>
<string name="poi_display_no">表示:不可</string>
<string name="poi_display_analog_yes">アナログ表示</string>
<string name="poi_display_digital_yes">デジタル表示</string>
<string name="poi_display_sundial_yes">日時計</string>
<string name="poi_support_pole">固定場所:柱</string>
<string name="poi_support_wall_mounted">固定場所:壁</string>
<string name="poi_support_tree">固定場所:樹木</string>
<string name="poi_support_pedestal">固定場所:台</string>
<string name="poi_support_ground">固定場所:地面</string>
<string name="poi_support_billboard">固定場所:看板</string>
<string name="poi_support_ceiling">固定場所:天井</string>
<string name="poi_support_suspended">固定場所:吊り下ろし</string>
<string name="poi_support_roof">固定場所:屋根</string>
<string name="poi_support_tower">固定場所:塔</string>
<string name="poi_passenger_information_display_yes">発車案内板:有り</string>
<string name="poi_passenger_information_display_no">発車案内板:無し</string>
<string name="poi_min_age">必要年齢</string>
<string name="poi_fire_operator">消防署管轄</string>
<string name="poi_length">長さ</string>
<string name="poi_wiki_link">Wikipedia</string>
<string name="poi_xmas_shop_christmas_tree">ツリーショップ(クリスマス用)</string>
<string name="poi_xmas_day_date">クリスマス:開催期間</string>
<string name="poi_xmas_note">クリスマス:備考</string>
<string name="poi_xmas_opening_hours">クリスマス:営業時間</string>
<string name="poi_xmas_location">クリスマス:場所</string>
<string name="poi_xmas_url">クリスマス:ウェブサイト</string>
<string name="poi_public_bookcase_type_phone_box">デザイン:古電話ボックス</string>
<string name="poi_public_bookcase_type_reading_box">デザイン:読書ボックス</string>
<string name="poi_public_bookcase_type_wooden_cabinet">デザイン:木製キャビネット</string>
<string name="poi_public_bookcase_type_metal_cabinet">デザイン:金属キャビネット</string>
<string name="poi_public_bookcase_type_shelf">デザイン:本棚</string>
<string name="poi_animal_keeping_type_paddock">デザイン:下見所、空きスペース</string>
<string name="poi_animal_keeping_type_open_stable">デザイン:空き厩舎</string>
</resources>

View file

@ -190,6 +190,7 @@
<dimen name="route_info_list_text_padding">78dp</dimen>
<dimen name="route_info_legend_padding">12dp</dimen>
<dimen name="route_info_warning_padding">27dp</dimen>
<dimen name="route_info_chart_height">78dp</dimen>
<dimen name="multi_selection_header_height">78dp</dimen>

View file

@ -2991,4 +2991,7 @@
<string name="rendering_attr_highway_class_path_name">Sti</string>
<string name="rendering_attr_highway_class_cycleway_name">Sykkelvei</string>
<string name="rendering_attr_undefined_name">Udefinert</string>
<string name="public_transport_warning_descr_blog">Lær mer om hvordan OsmAnd kaklulerer ruter i bloggen vår.</string>
<string name="public_transport_warning_title">Offentlige transportruter er nå i betatestingsstadie, så feil og unøyaktigheter kan forefinnes.</string>
<string name="add_intermediate">Legg til mellomliggende punkt</string>
</resources>

View file

@ -2976,4 +2976,7 @@ Pôr do Sol: %2$s</string>
<string name="rendering_attr_surface_mud_name">Lama</string>
<string name="rendering_attr_surface_salt_name">Sal</string>
<string name="rendering_attr_highway_class_bridleway_name">Estrada equestre</string>
<string name="public_transport_warning_descr_blog">Saiba mais sobre como OsmAnd calcula as rotas em nosso blog.</string>
<string name="public_transport_warning_title">As rotas de transporte público estão agora em fase de testes beta, portanto erros e imprecisões podem ocorrer.</string>
<string name="add_intermediate">Adicionar ponto intermediário</string>
</resources>

View file

@ -570,7 +570,7 @@
<string name="fav_points_not_exist">Neexistujú žiadne Obľúbené miesta</string>
<string name="update_existing">Nahradiť</string>
<string name="only_show">Zobraziť trasu</string>
<string name="follow">Navigovať</string>
<string name="follow">Spustiť pokyny</string>
<string name="recalculate_route_to_your_location">Výber režimu dopravy (voliteľné):</string>
<string name="mark_final_location_first">Prosím, najskôr zvoľte cieľ</string>
<string name="get_directions">Pokyny</string>
@ -2902,7 +2902,7 @@ Zodpovedá oblasti: %1$s x %2$s</string>
<string name="add_destination_query">Najprv pridajte cieľ</string>
<string name="shared_string_swap">Vymeniť</string>
<string name="show_more">Zobraziť viac</string>
<string name="tracks_on_map">Stopy na mape</string>
<string name="tracks_on_map">Zobrazené stopy</string>
<string name="release_3_3">• Nová obrazovka \'Pokyny\': Zobrazuje tlačidlá pre cieľ Domov a Práca, skratku pre \'predchádzajúcu trasu\', zoznam aktívnych stôp a značiek GPX, históriu vyhľadávania
\n
\n • Doplňujúce informácie pod \'Detaily trasu\': druhy ciest, povrch, strmosť, kvalita povrchu
@ -2932,4 +2932,51 @@ Zodpovedá oblasti: %1$s x %2$s</string>
<string name="quick_action_show_hide_gpx_tracks_descr">Použitím tohto tlačidla zobrazíte alebo skryjete zvolené stopy GPX na mape</string>
<string name="quick_action_gpx_tracks_hide">Skryť GPX stopy</string>
<string name="quick_action_gpx_tracks_show">Zobraziť GPX stopy</string>
<string name="transfers_size">%1$d prenosov</string>
<string name="add_start_and_end_points">Pridať počiatočný a koncový bod</string>
<string name="route_add_start_point">Pridať počiatočný bod</string>
<string name="route_descr_select_start_point">Zvoliť počiatočný bod</string>
<string name="rendering_attr_surface_unpaved_name">Nespevnený</string>
<string name="rendering_attr_surface_sand_name">Piesok</string>
<string name="rendering_attr_surface_grass_name">Tráva</string>
<string name="rendering_attr_surface_grass_paver_name">Zatrávňovacie panely</string>
<string name="rendering_attr_surface_ground_name">Zem</string>
<string name="rendering_attr_surface_dirt_name">Hlina</string>
<string name="rendering_attr_surface_mud_name">Blato</string>
<string name="rendering_attr_surface_ice_name">Ľad</string>
<string name="rendering_attr_surface_salt_name">Soľ</string>
<string name="rendering_attr_surface_snow_name">Sneh</string>
<string name="rendering_attr_surface_asphalt_name">Asfalt</string>
<string name="rendering_attr_surface_paved_name">Spevnený povrch</string>
<string name="rendering_attr_surface_concrete_name">Betón</string>
<string name="rendering_attr_surface_sett_name">Hranaté kamene</string>
<string name="rendering_attr_surface_cobblestone_name">Okrúhle kamene</string>
<string name="rendering_attr_surface_paving_stones_name">Dlažobné tvárnice</string>
<string name="rendering_attr_surface_pebblestone_name">Oblý štrk</string>
<string name="rendering_attr_surface_stone_name">Kameň</string>
<string name="rendering_attr_surface_metal_name">Kov</string>
<string name="rendering_attr_surface_wood_name">Drevo</string>
<string name="rendering_attr_surface_gravel_name">Ostrý štrk</string>
<string name="rendering_attr_surface_fine_gravel_name">Jemné kamienky</string>
<string name="rendering_attr_surface_compacted_name">Valcovaný povrch</string>
<string name="rendering_attr_smoothness_excellent_name">Vynikajúca</string>
<string name="rendering_attr_smoothness_good_name">Dobrá</string>
<string name="rendering_attr_smoothness_intermediate_name">Stredná</string>
<string name="rendering_attr_smoothness_bad_name">Zlá</string>
<string name="rendering_attr_smoothness_very_bad_name">Veľmi zlá</string>
<string name="rendering_attr_smoothness_horrible_name">Hrozná</string>
<string name="rendering_attr_smoothness_very_horrible_name">Veľmi hrozná</string>
<string name="rendering_attr_smoothness_impassable_name">Neprejazdná</string>
<string name="rendering_attr_highway_class_motorway_name">Diaľnica</string>
<string name="rendering_attr_highway_class_state_road_name">Štátna cesta</string>
<string name="rendering_attr_highway_class_road_name">Cesta</string>
<string name="rendering_attr_highway_class_street_name">Ulica</string>
<string name="rendering_attr_highway_class_service_name">Obslužná cesta</string>
<string name="rendering_attr_highway_class_footway_name">Chodník</string>
<string name="rendering_attr_highway_class_track_name">Poľná cesta</string>
<string name="rendering_attr_highway_class_bridleway_name">Cesta pre kone</string>
<string name="rendering_attr_highway_class_steps_name">Schody</string>
<string name="rendering_attr_highway_class_path_name">Chodníček</string>
<string name="rendering_attr_highway_class_cycleway_name">Cyklocesta</string>
<string name="rendering_attr_undefined_name">Neurčené</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -282,6 +282,7 @@
<dimen name="route_info_list_text_padding">54dp</dimen>
<dimen name="route_info_legend_padding">8dp</dimen>
<dimen name="route_info_warning_padding">18dp</dimen>
<dimen name="route_info_chart_height">52dp</dimen>
<dimen name="multi_selection_header_height">52dp</dimen>

View file

@ -10,9 +10,15 @@
- For wording and consistency, please note https://osmand.net/help-online?id=technical-articles#Creating_a_Consistent_User_Experience
Thx - Hardy
--> <string name="quick_action_day_night_mode">%s mode</string>
-->
<string name="quick_action_day_night_mode">%s mode</string>
<string name="avoid_pt_types_descr">Select a public transport types you want to avoid during navigation:</string>
<string name="avoid_pt_types">Avoid transport types…</string>
<string name="shared_string_walk">Walk</string>
<string name="save_poi_value_exceed_length">Value of tag \"%s\" cannot exceed 255 chars. \nPlease edit it before continue.</string>
<string name="save_poi_value_exceed_length_title">Length of \"%s\" value</string>
<string name="public_transport_warning_descr_blog">Learn more about how OsmAnd calculates routes in our blog.</string>
<string name="public_transport_warning_title">Public transport routes are now in the beta testing phase, so errors and inaccuracies may occur.</string>
<string name="public_transport_warning_title">Public transport navigation is currently in beta testing, errors and inaccuracies may occur.</string>
<string name="add_intermediate">Add intermediate point</string>
<string name="transfers_size">%1$d transfers</string>
<string name="add_start_and_end_points">Add start and end points</string>
@ -1669,7 +1675,7 @@
<string name="animate_routing_route_not_calculated">Please calculate the route first</string>
<string name="animate_routing_route">Simulate using calculated route</string>
<string name="animate_routing_gpx">Simulate using GPX track</string>
<string name="route_is_too_long_v2">Please add intermediate destinations if no path is found for this long route within 10 mins.</string>
<string name="route_is_too_long_v2">Long distance: Please add intermediate destinations if no route is found within 10 minutes.</string>
<string name="auto_zoom_none">No auto zoom</string>
<string name="auto_zoom_close">To close-up</string>
<string name="auto_zoom_far">To mid-range</string>
@ -1967,8 +1973,8 @@
</string>
<string name="osmand_extended_description_part5">
Cycling\n
• Find cycling paths on the map\n
• GPS navigation in cycling mode builds your route using cycling paths\n
• Find cycle paths on the map\n
• GPS navigation in cycling mode builds your route using cycle paths\n
• See your speed and altitude\n
• GPX recording option enables you to record your trip and share it\n
• Via an additional plugin you can enable contour lines and hillshading

View file

@ -60,6 +60,12 @@ public class OsmAndFormatter {
return hours + ":" + (minutes < 10 ? "0" + minutes : minutes) + ":" + (sec < 10 ? "0" + sec : sec);
}
public static String getFormattedDurationShortMinutes(int seconds) {
int hours = seconds / (60 * 60);
int minutes = (seconds / 60) % 60;
return hours + ":" + (minutes < 10 ? "0" + minutes : minutes);
}
public static String getFormattedTime(long seconds, boolean useCurrentTime) {
Calendar calendar = Calendar.getInstance();
if (useCurrentTime) {

View file

@ -1226,7 +1226,7 @@ public class GpxUiHelper {
chart.setDragEnabled(useGesturesAndScale);
chart.setScaleYEnabled(false);
chart.setAutoScaleMinMaxEnabled(true);
chart.setDrawBorders(false);
chart.setDrawBorders(true);
chart.getDescription().setEnabled(false);
chart.setDragDecelerationEnabled(false);
@ -1252,6 +1252,9 @@ public class GpxUiHelper {
yr.setDrawAxisLine(false);
yr.setDrawGridLines(false);
yr.setAxisMinimum(0f);
chart.setMinOffset(0);
chart.setExtraRightOffset(16);
chart.setExtraLeftOffset(16);
yl.setTextColor(ContextCompat.getColor(app, nightMode ? R.color.primary_text_dark : R.color.primary_text_light));
yr.setTextColor(ContextCompat.getColor(app, nightMode ? R.color.primary_text_dark : R.color.primary_text_light));
@ -1266,7 +1269,8 @@ public class GpxUiHelper {
@NonNull HorizontalBarChart mChart,
@NonNull RouteStatistics.Statistics<E> routeStatistics,
@NonNull GPXTrackAnalysis analysis,
boolean useRightAxis) {
boolean useRightAxis,
boolean nightMode) {
XAxis xAxis = mChart.getXAxis();
xAxis.setEnabled(false);
@ -1292,9 +1296,10 @@ public class GpxUiHelper {
entries.add(new BarEntry(0, stacks));
BarDataSet barDataSet = new BarDataSet(entries, "");
barDataSet.setColors(colors);
barDataSet.setBarBorderColor(ContextCompat.getColor(app, nightMode ? R.color.divider_dark : R.color.divider_light));
BarData dataSet = new BarData(barDataSet);
dataSet.setDrawValues(false);
dataSet.setBarWidth(1);
mChart.getAxisRight().setAxisMaximum(dataSet.getYMax());
mChart.getAxisLeft().setAxisMaximum(dataSet.getYMax());

View file

@ -3,6 +3,7 @@ package net.osmand.plus.osmedit;
import android.app.Activity;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
@ -108,7 +109,7 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
private View view;
@Override
public void onAttach(Activity activity) {
public void onAttach(Context activity) {
super.onAttach(activity);
OsmEditingPlugin plugin = OsmandPlugin.getPlugin(OsmEditingPlugin.class);
if (getSettings().OFFLINE_EDITION.get()
@ -400,7 +401,14 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
}
private void trySave() {
if (TextUtils.isEmpty(poiTypeEditText.getText())) {
String tagWithExceedingValue = isTextLengthInRange();
if (!Algorithms.isEmpty(tagWithExceedingValue)){
ValueExceedLimitDialogFragment f = new ValueExceedLimitDialogFragment();
Bundle args = new Bundle();
args.putString("tag", tagWithExceedingValue);
f.setArguments(args);
f.show(getChildFragmentManager(), "exceedDialog");
} else if (TextUtils.isEmpty(poiTypeEditText.getText())) {
HashSet<String> tagsCopy = new HashSet<>();
tagsCopy.addAll(editPoiData.getTagValues().keySet());
if (Algorithms.isEmpty(editPoiData.getTag(OSMSettings.OSMTagKey.ADDR_HOUSE_NUMBER.getValue()))) {
@ -422,12 +430,22 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
} else if (editPoiData.getPoiCategory() == getMyApplication().getPoiTypes().getOtherPoiCategory()) {
poiTypeEditText.setError(getResources().getString(R.string.please_specify_poi_type));
} else if (editPoiData.getPoiTypeDefined() == null) {
poiTypeEditText.setError(getResources().getString(R.string.please_specify_poi_type_only_from_list));
poiTypeEditText.setError(
getResources().getString(R.string.please_specify_poi_type_only_from_list));
} else {
save();
}
}
private String isTextLengthInRange() {
for (String s: editPoiData.getChangedTags()) {
if (editPoiData.getTag(s).length() > 255) {
return s;
}
}
return "";
}
private boolean testTooManyCapitalLetters(String name) {
if(name == null) {
return false;
@ -889,6 +907,23 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
}
}
public static class ValueExceedLimitDialogFragment extends DialogFragment {
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
String msg = getString(R.string.save_poi_value_exceed_length);
String fieldTag = getArguments().getString("tag", "");
if(!Algorithms.isEmpty(fieldTag)) {
msg = String.format(msg, fieldTag);
}
builder.setTitle(String.format(getResources().getString(R.string.save_poi_value_exceed_length_title), fieldTag))
.setMessage(msg)
.setNegativeButton(R.string.shared_string_ok, null);
return builder.create();
}
}
private TextView.OnEditorActionListener mOnEditorActionListener =
new TextView.OnEditorActionListener() {
@Override

View file

@ -48,6 +48,7 @@ public class AvoidRoadsBottomSheetDialogFragment extends MenuBottomSheetDialogFr
public static final int OPEN_AVOID_ROADS_DIALOG_REQUEST_CODE = 1;
private static final String AVOID_ROADS_TYPES_KEY = "avoid_roads_types";
private static final String HIDE_IMPASSABLE_ROADS_KEY = "hide_impassable_roads";
private static final String AVOID_ROADS_OBJECTS_KEY = "avoid_roads_objects";
private RoutingOptionsHelper routingOptionsHelper;
@ -55,6 +56,14 @@ public class AvoidRoadsBottomSheetDialogFragment extends MenuBottomSheetDialogFr
private HashMap<String, Boolean> routingParametersMap;
private List<LatLon> removedImpassableRoads;
private LinearLayout stylesContainer;
private boolean hideImpassableRoads;
public AvoidRoadsBottomSheetDialogFragment() {
}
public AvoidRoadsBottomSheetDialogFragment(boolean hideImpassableRoads) {
this.hideImpassableRoads = hideImpassableRoads;
}
List<BottomSheetItemWithCompoundButton> compoundButtons = new ArrayList<>();
@ -69,12 +78,15 @@ public class AvoidRoadsBottomSheetDialogFragment extends MenuBottomSheetDialogFr
if (savedInstanceState.containsKey(AVOID_ROADS_TYPES_KEY)) {
routingParametersMap = (HashMap<String, Boolean>) savedInstanceState.getSerializable(AVOID_ROADS_TYPES_KEY);
}
if (savedInstanceState.containsKey(HIDE_IMPASSABLE_ROADS_KEY)) {
hideImpassableRoads = true;
}
if (savedInstanceState.containsKey(AVOID_ROADS_OBJECTS_KEY)) {
removedImpassableRoads = (List<LatLon>) savedInstanceState.getSerializable(AVOID_ROADS_OBJECTS_KEY);
}
}
if (routingParametersMap == null) {
routingParametersMap = generateStylesMap(app);
routingParametersMap = getRoutingParametersMap(app);
}
if (removedImpassableRoads == null) {
removedImpassableRoads = new ArrayList<LatLon>();
@ -83,7 +95,7 @@ public class AvoidRoadsBottomSheetDialogFragment extends MenuBottomSheetDialogFr
final int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;
final View titleView = View.inflate(new ContextThemeWrapper(getContext(), themeRes), R.layout.bottom_sheet_item_toolbar_title, null);
TextView textView = (TextView) titleView.findViewById(R.id.title);
textView.setText(R.string.impassable_road);
textView.setText(!hideImpassableRoads ? R.string.impassable_road : R.string.avoid_pt_types);
Toolbar toolbar = (Toolbar) titleView.findViewById(R.id.toolbar);
toolbar.setNavigationIcon(getContentIcon(R.drawable.ic_arrow_back));
@ -101,7 +113,8 @@ public class AvoidRoadsBottomSheetDialogFragment extends MenuBottomSheetDialogFr
items.add(titleItem);
final SimpleBottomSheetItem descriptionItem = (SimpleBottomSheetItem) new SimpleBottomSheetItem.Builder()
.setTitle(getString(R.string.avoid_roads_descr))
.setTitle(
!hideImpassableRoads ? getString(R.string.avoid_roads_descr) : getString(R.string.avoid_pt_types_descr))
.setLayoutId(R.layout.bottom_sheet_item_title_long)
.create();
items.add(descriptionItem);
@ -119,42 +132,46 @@ public class AvoidRoadsBottomSheetDialogFragment extends MenuBottomSheetDialogFr
}
items.add(new BaseBottomSheetItem.Builder().setCustomView(stylesContainer).create());
populateImpassableRoadsObjects();
if(!hideImpassableRoads) {
populateImpassableRoadsObjects();
final View buttonView = View.inflate(new ContextThemeWrapper(getContext(), themeRes), R.layout.bottom_sheet_item_btn, null);
TextView buttonDescription = (TextView) buttonView.findViewById(R.id.button_descr);
buttonDescription.setText(R.string.shared_string_select_on_map);
buttonDescription.setTextColor(getResolvedColor(nightMode ? R.color.active_buttons_and_links_dark : R.color.active_buttons_and_links_light));
final View buttonView = View.inflate(new ContextThemeWrapper(getContext(), themeRes), R.layout.bottom_sheet_item_btn, null);
TextView buttonDescription = (TextView) buttonView.findViewById(R.id.button_descr);
buttonDescription.setText(R.string.shared_string_select_on_map);
buttonDescription.setTextColor(getResolvedColor(nightMode ? R.color.active_buttons_and_links_dark : R.color.active_buttons_and_links_light));
FrameLayout buttonContainer = buttonView.findViewById(R.id.button_container);
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
AndroidUtils.setBackground(app, buttonContainer, nightMode, R.drawable.btn_border_light, R.drawable.btn_border_dark);
AndroidUtils.setBackground(app, buttonDescription, nightMode, R.drawable.ripple_light, R.drawable.ripple_dark);
} else {
AndroidUtils.setBackground(app, buttonContainer, nightMode, R.drawable.btn_border_trans_light, R.drawable.btn_border_trans_dark);
}
buttonContainer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
mapActivity.getDashboard().setDashboardVisibility(false, DashboardOnMap.DashboardType.ROUTE_PREFERENCES);
mapActivity.getMapRouteInfoMenu().hide();
app.getAvoidSpecificRoads().selectFromMap(mapActivity);
Fragment fragment = getTargetFragment();
if (fragment != null) {
fragment.onActivityResult(getTargetRequestCode(), OPEN_AVOID_ROADS_DIALOG_REQUEST_CODE, null);
}
}
dismiss();
}
});
final SimpleBottomSheetItem buttonItem = (SimpleBottomSheetItem) new SimpleBottomSheetItem.Builder()
.setCustomView(buttonView)
.create();
items.add(buttonItem);
FrameLayout buttonContainer = buttonView.findViewById(R.id.button_container);
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
AndroidUtils.setBackground(app, buttonContainer, nightMode, R.drawable.btn_border_light, R.drawable.btn_border_dark);
AndroidUtils.setBackground(app, buttonDescription, nightMode, R.drawable.ripple_light, R.drawable.ripple_dark);
} else {
AndroidUtils.setBackground(app, buttonContainer, nightMode, R.drawable.btn_border_trans_light, R.drawable.btn_border_trans_dark);
}
buttonContainer.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
mapActivity.getDashboard().setDashboardVisibility(false, DashboardOnMap.DashboardType.ROUTE_PREFERENCES);
mapActivity.getMapRouteInfoMenu().hide();
app.getAvoidSpecificRoads().selectFromMap(mapActivity);
Fragment fragment = getTargetFragment();
if (fragment != null) {
fragment.onActivityResult(getTargetRequestCode(), OPEN_AVOID_ROADS_DIALOG_REQUEST_CODE, null);
}
}
dismiss();
}
});
final SimpleBottomSheetItem buttonItem = (SimpleBottomSheetItem) new SimpleBottomSheetItem.Builder()
.setCustomView(buttonView)
.create();
items.add(buttonItem);
items.add(new SubtitleDividerItem(app));
@ -243,6 +260,9 @@ public class AvoidRoadsBottomSheetDialogFragment extends MenuBottomSheetDialogFr
super.onSaveInstanceState(outState);
outState.putSerializable(AVOID_ROADS_TYPES_KEY, routingParametersMap);
outState.putSerializable(AVOID_ROADS_OBJECTS_KEY, (Serializable) removedImpassableRoads);
if(hideImpassableRoads) {
outState.putBoolean(HIDE_IMPASSABLE_ROADS_KEY, true);
}
}
@Override
@ -273,7 +293,7 @@ public class AvoidRoadsBottomSheetDialogFragment extends MenuBottomSheetDialogFr
if (parameter != null) {
boolean checked = entry.getValue();
OsmandSettings.CommonPreference<Boolean> preference = app.getSettings().getCustomRoutingBooleanProperty(parameter.getId(), parameter.getDefaultBoolean());
preference.set(checked);
preference.setModeValue(app.getRoutingHelper().getAppMode(), checked);
}
}
@ -297,13 +317,13 @@ public class AvoidRoadsBottomSheetDialogFragment extends MenuBottomSheetDialogFr
}
@NonNull
private HashMap<String, Boolean> generateStylesMap(OsmandApplication app) {
private HashMap<String, Boolean> getRoutingParametersMap(OsmandApplication app) {
HashMap<String, Boolean> res = new HashMap<>();
List<GeneralRouter.RoutingParameter> avoidParameters = routingOptionsHelper.getAvoidRoutingPrefsForAppMode(app.getRoutingHelper().getAppMode());
for (GeneralRouter.RoutingParameter parameter : avoidParameters) {
OsmandSettings.CommonPreference<Boolean> preference = app.getSettings().getCustomRoutingBooleanProperty(parameter.getId(), parameter.getDefaultBoolean());
res.put(parameter.getId(), preference.get());
res.put(parameter.getId(), preference.getModeValue(app.getRoutingHelper().getAppMode()));
}
return res;

View file

@ -61,7 +61,6 @@ import net.osmand.plus.helpers.WaypointHelper;
import net.osmand.plus.mapmarkers.MapMarkerSelectionFragment;
import net.osmand.plus.poi.PoiUIFilter;
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.AvoidRoadsRoutingParameter;
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.AvoidRoadsTypesRoutingParameter;
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.LocalRoutingParameterGroup;
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.MuteSoundRoutingParameter;
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.ShowAlongTheRouteItem;
@ -95,6 +94,7 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import static net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.DRIVING_STYLE;
@ -714,19 +714,15 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
OnClickListener listener = new OnClickListener() {
@Override
public void onClick(View v) {
//MapActivity mapActivity = getMapActivity();
//if (mapActivity != null) {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
if (selected.size() > 0) {
// OsmandApplication app = mapActivity.getMyApplication();
ApplicationMode next = selected.iterator().next();
// if (app.getRoutingHelper().isRouteCalculated()) {
// app.getSettings().LAST_ROUTE_APPLICATION_MODE.set(next);
// }
updateApplicationMode(am, next);
}
updateFinishPointView();
updateOptionsButtons();
//}
}
}
};
final List<ApplicationMode> values = new ArrayList<ApplicationMode>(ApplicationMode.values(mapActivity.getMyApplication()));
@ -778,7 +774,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
if (mapActivity == null || mainView == null) {
return;
}
OsmandApplication app = mapActivity.getMyApplication();
final OsmandApplication app = mapActivity.getMyApplication();
RoutingHelper routingHelper = app.getRoutingHelper();
final boolean nightMode = app.getDaynightHelper().isNightModeForMapControls();
final OsmandSettings settings = app.getSettings();
@ -975,60 +971,20 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
}
}
}
} else if (parameter instanceof AvoidRoadsTypesRoutingParameter) {
final LinearLayout item = createToolbarOptionView(false, null, -1, -1, null);
if (item != null) {
item.findViewById(R.id.route_option_container).setVisibility(View.GONE);
List<RoutingParameter> avoidParameters = app.getRoutingOptionsHelper().getAvoidRoutingPrefsForAppMode(applicationMode);
final List<RoutingParameter> avoidedParameters = new ArrayList<>();
for (int i = 0; i < avoidParameters.size(); i++) {
RoutingParameter p = avoidParameters.get(i);
CommonPreference<Boolean> preference = settings.getCustomRoutingBooleanProperty(p.getId(), p.getDefaultBoolean());
if (preference != null && preference.get()) {
avoidedParameters.add(p);
}
}
if (avoidedParameters.isEmpty()) {
continue;
}
for (int i = 0; i < avoidedParameters.size(); i++) {
final RoutingParameter routingParameter = avoidedParameters.get(i);
final View container = createToolbarSubOptionView(false, SettingsBaseActivity.getRoutingStringPropertyName(app, routingParameter.getId(), routingParameter.getName()), R.drawable.ic_action_remove_dark, i == avoidedParameters.size() - 1, new OnClickListener() {
@Override
public void onClick(View v) {
CommonPreference<Boolean> preference = settings.getCustomRoutingBooleanProperty(routingParameter.getId(), routingParameter.getDefaultBoolean());
preference.set(false);
avoidedParameters.remove(routingParameter);
if (avoidedParameters.isEmpty()) {
mode.parameters.remove(parameter);
}
if (mode.parameters.size() > 2) {
item.removeView(v);
} else {
updateOptionsButtons();
}
}
});
if (container != null) {
item.addView(container, newLp);
}
}
optionsContainer.addView(item, lp);
}
} else if (parameter instanceof AvoidRoadsRoutingParameter) {
} else if (parameter instanceof AvoidRoadsRoutingParameter || parameter instanceof RoutingOptionsHelper.AvoidPTTypesRoutingParameter) {
final LinearLayout item = createToolbarOptionView(false, null, -1, -1, null);
if (item != null) {
item.findViewById(R.id.route_option_container).setVisibility(View.GONE);
AvoidSpecificRoads avoidSpecificRoads = app.getAvoidSpecificRoads();
Map<LatLon, RouteDataObject> impassableRoads = avoidSpecificRoads.getImpassableRoads();
if (impassableRoads.isEmpty()) {
continue;
Map<LatLon, RouteDataObject> impassableRoads = new TreeMap<>();
if (parameter instanceof AvoidRoadsRoutingParameter) {
impassableRoads = app.getAvoidSpecificRoads().getImpassableRoads();
}
Iterator<RouteDataObject> it = impassableRoads.values().iterator();
while (it.hasNext()) {
final RouteDataObject routeDataObject = it.next();
final View container = createToolbarSubOptionView(false, avoidSpecificRoads.getText(routeDataObject), R.drawable.ic_action_remove_dark, !it.hasNext(), new OnClickListener() {
final View container = createToolbarSubOptionView(false, app.getAvoidSpecificRoads().getText(routeDataObject), R.drawable.ic_action_remove_dark, !it.hasNext(), new OnClickListener() {
@Override
public void onClick(View v) {
MapActivity mapActivity = getMapActivity();
@ -1057,7 +1013,41 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
item.addView(container, newLp);
}
}
optionsContainer.addView(item, lp);
List<RoutingParameter> avoidParameters = app.getRoutingOptionsHelper().getAvoidRoutingPrefsForAppMode(applicationMode);
final List<RoutingParameter> avoidedParameters = new ArrayList<>();
for (int i = 0; i < avoidParameters.size(); i++) {
RoutingParameter p = avoidParameters.get(i);
CommonPreference<Boolean> preference = settings.getCustomRoutingBooleanProperty(p.getId(), p.getDefaultBoolean());
if (preference != null && preference.getModeValue(app.getRoutingHelper().getAppMode())) {
avoidedParameters.add(p);
}
}
for (int i = 0; i < avoidedParameters.size(); i++) {
final RoutingParameter routingParameter = avoidedParameters.get(i);
final View container = createToolbarSubOptionView(false, SettingsBaseActivity.getRoutingStringPropertyName(app, routingParameter.getId(), routingParameter.getName()), R.drawable.ic_action_remove_dark, i == avoidedParameters.size() - 1, new OnClickListener() {
@Override
public void onClick(View v) {
CommonPreference<Boolean> preference = settings.getCustomRoutingBooleanProperty(routingParameter.getId(), routingParameter.getDefaultBoolean());
preference.setModeValue(app.getRoutingHelper().getAppMode(), false);
avoidedParameters.remove(routingParameter);
if (avoidedParameters.isEmpty()) {
mode.parameters.remove(parameter);
}
if (mode.parameters.size() > 2) {
item.removeView(v);
} else {
updateOptionsButtons();
}
}
});
if (container != null) {
item.addView(container, newLp);
}
}
if(avoidedParameters.size() > 0 || impassableRoads.size() > 0) {
optionsContainer.addView(item, lp);
}
}
} else if (parameter instanceof LocalRoutingParameterGroup) {
final LocalRoutingParameterGroup group = (LocalRoutingParameterGroup) parameter;

View file

@ -32,7 +32,7 @@ import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem;
import net.osmand.plus.development.OsmandDevelopmentPlugin;
import net.osmand.plus.helpers.GpxUiHelper;
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.AvoidRoadsRoutingParameter;
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.AvoidRoadsTypesRoutingParameter;
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.AvoidPTTypesRoutingParameter;
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.DividerItem;
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.GpxLocalRoutingParameter;
import net.osmand.plus.routepreparationmenu.RoutingOptionsHelper.LocalRoutingParameter;
@ -91,8 +91,8 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
if (OsmandPlugin.getEnabledPlugin(OsmandDevelopmentPlugin.class) != null) {
items.add(createRouteSimulationItem(optionsItem));
}
} else if (optionsItem instanceof AvoidRoadsTypesRoutingParameter) {
items.add(createAvoidRoadsTypesItem(optionsItem));
} else if (optionsItem instanceof AvoidPTTypesRoutingParameter) {
items.add(createAvoidPTTypesItem(optionsItem));
} else if (optionsItem instanceof AvoidRoadsRoutingParameter) {
items.add(createAvoidRoadsItem(optionsItem));
} else if (optionsItem instanceof GpxLocalRoutingParameter) {
@ -198,7 +198,8 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
.create();
}
private BaseBottomSheetItem createAvoidRoadsTypesItem(final LocalRoutingParameter optionsItem) {
private BaseBottomSheetItem createAvoidRoadsItem(final LocalRoutingParameter optionsItem) {
return new SimpleBottomSheetItem.Builder()
.setIcon(getContentIcon((optionsItem.getActiveIconId())))
.setTitle(getString(R.string.impassable_road))
@ -216,16 +217,17 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
.create();
}
private BaseBottomSheetItem createAvoidRoadsItem(final LocalRoutingParameter optionsItem) {
private BaseBottomSheetItem createAvoidPTTypesItem(final LocalRoutingParameter optionsItem) {
return new SimpleBottomSheetItem.Builder()
.setIcon(getContentIcon((optionsItem.getActiveIconId())))
.setTitle(getString(R.string.impassable_road))
.setTitle(getString(R.string.avoid_pt_types))
.setLayoutId(R.layout.bottom_sheet_item_simple_56dp)
.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
routingOptionsHelper.addNewRouteMenuParameter(applicationMode, optionsItem);
AvoidRoadsBottomSheetDialogFragment avoidRoadsFragment = new AvoidRoadsBottomSheetDialogFragment();
AvoidRoadsBottomSheetDialogFragment avoidRoadsFragment = new AvoidRoadsBottomSheetDialogFragment(true);
avoidRoadsFragment.setTargetFragment(RouteOptionsBottomSheet.this, AvoidRoadsBottomSheetDialogFragment.REQUEST_CODE);
avoidRoadsFragment.show(mapActivity.getSupportFragmentManager(), AvoidRoadsBottomSheetDialogFragment.TAG);
updateMenu();
@ -350,12 +352,16 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
private List<LocalRoutingParameter> getRoutingParameters(ApplicationMode applicationMode) {
List<String> routingParameters = new ArrayList<>();
if (applicationMode.equals(ApplicationMode.CAR)) {
if (applicationMode.isDerivedRoutingFrom(ApplicationMode.CAR)) {
routingParameters = AppModeOptions.CAR.routingParameters;
} else if (applicationMode.equals(ApplicationMode.BICYCLE)) {
} else if (applicationMode.isDerivedRoutingFrom(ApplicationMode.BICYCLE)) {
routingParameters = AppModeOptions.BICYCLE.routingParameters;
} else if (applicationMode.equals(ApplicationMode.PEDESTRIAN)) {
} else if (applicationMode.isDerivedRoutingFrom(ApplicationMode.PEDESTRIAN)) {
routingParameters = AppModeOptions.PEDESTRIAN.routingParameters;
} else if (applicationMode.isDerivedRoutingFrom(ApplicationMode.PUBLIC_TRANSPORT)) {
routingParameters = AppModeOptions.PUBLIC_TRANSPORT.routingParameters;
} else {
routingParameters = AppModeOptions.OTHER.routingParameters;
}
return routingOptionsHelper.getRoutingParameters(applicationMode, routingParameters);
@ -457,7 +463,7 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
GeneralRouter.USE_HEIGHT_OBSTACLES,
DividerItem.KEY,
GeneralRouter.ALLOW_MOTORWAYS,
AvoidRoadsTypesRoutingParameter.KEY,
AvoidRoadsRoutingParameter.KEY,
ShowAlongTheRouteItem.KEY,
DividerItem.KEY,
GpxLocalRoutingParameter.KEY,
@ -467,7 +473,23 @@ public class RouteOptionsBottomSheet extends MenuBottomSheetDialogFragment {
PEDESTRIAN(MuteSoundRoutingParameter.KEY,
GeneralRouter.USE_HEIGHT_OBSTACLES,
DividerItem.KEY,
AvoidRoadsTypesRoutingParameter.KEY,
AvoidRoadsRoutingParameter.KEY,
ShowAlongTheRouteItem.KEY,
DividerItem.KEY,
GpxLocalRoutingParameter.KEY,
OtherSettingsRoutingParameter.KEY,
RouteSimulationItem.KEY),
PUBLIC_TRANSPORT(// MuteSoundRoutingParameter.KEY,
// DividerItem.KEY,
AvoidPTTypesRoutingParameter.KEY,
// ShowAlongTheRouteItem.KEY,
// DividerItem.KEY,
OtherSettingsRoutingParameter.KEY),
OTHER(MuteSoundRoutingParameter.KEY,
DividerItem.KEY,
AvoidRoadsRoutingParameter.KEY,
ShowAlongTheRouteItem.KEY,
DividerItem.KEY,
GpxLocalRoutingParameter.KEY,

View file

@ -355,8 +355,8 @@ public class RoutingOptionsHelper {
return new RouteSimulationItem();
case ShowAlongTheRouteItem.KEY:
return new ShowAlongTheRouteItem();
case AvoidRoadsTypesRoutingParameter.KEY:
return new AvoidRoadsTypesRoutingParameter();
case AvoidPTTypesRoutingParameter.KEY:
return new AvoidPTTypesRoutingParameter();
case AvoidRoadsRoutingParameter.KEY:
return new AvoidRoadsRoutingParameter();
case GpxLocalRoutingParameter.KEY:
@ -781,11 +781,11 @@ public class RoutingOptionsHelper {
}
}
public static class AvoidRoadsTypesRoutingParameter extends LocalRoutingParameter {
public static class AvoidPTTypesRoutingParameter extends LocalRoutingParameter {
public static final String KEY = "AvoidRoadsTypesRoutingParameter";
public static final String KEY = "AvoidPTTypesRoutingParameter";
public AvoidRoadsTypesRoutingParameter() {
public AvoidPTTypesRoutingParameter() {
super(null);
}
@ -795,15 +795,16 @@ public class RoutingOptionsHelper {
@Override
public int getActiveIconId() {
return R.drawable.ic_action_road_works_dark;
return R.drawable.ic_action_bus_dark;
}
@Override
public int getDisabledIconId() {
return R.drawable.ic_action_road_works_dark;
return R.drawable.ic_action_bus_dark;
}
}
public static class GpxLocalRoutingParameter extends LocalRoutingParameter {
public static final String KEY = "GpxLocalRoutingParameter";

View file

@ -607,7 +607,8 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
!nightMode ? R.color.ctx_menu_collapse_icon_color_light : R.color.ctx_menu_collapse_icon_color_dark);
}
private void buildSegmentItem(View view, final TransportRouteResultSegment segment, long startTime) {
private void buildSegmentItem(View view, final TransportRouteResultSegment segment,
final TransportRouteResultSegment nextSegment, int[] startTime, double walkSpeed, double changeTime) {
TransportRoute transportRoute = segment.route;
List<TransportStop> stops = segment.getTravelStops();
final TransportStop startStop = stops.get(0);
@ -632,7 +633,7 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
Drawable icon = getContentIcon(drawableResId);
Typeface typeface = FontCache.getRobotoMedium(app);
String timeText = OsmAndFormatter.getFormattedTime(startTime, false);
String timeText = OsmAndFormatter.getFormattedDurationShortMinutes(startTime[0]);
SpannableString secondaryText = new SpannableString(getString(R.string.sit_on_the_stop));
secondaryText.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, nightMode ? R.color.primary_text_dark : R.color.primary_text_light)), 0, secondaryText.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
@ -695,11 +696,13 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
buildCollapsableRow(stopsContainer, spannable, textType, true, collapsableView, null);
final TransportStop endStop = stops.get(stops.size() - 1);
long depTime = segment.depTime + arrivalTime;
int depTime = segment.depTime + arrivalTime;
if (depTime <= 0) {
depTime = startTime + arrivalTime;
depTime = startTime[0] + arrivalTime;
}
String textTime = OsmAndFormatter.getFormattedTime(depTime, false);
// TODO: fix later for schedule
startTime[0] += (int) segment.travelTime + (nextSegment != null ? changeTime / 2 : 0);
String textTime = OsmAndFormatter.getFormattedDurationShortMinutes(startTime[0]);
secondaryText = new SpannableString(getString(R.string.exit_at));
secondaryText.setSpan(new CustomTypefaceSpan(typeface), 0, secondaryText.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
@ -719,6 +722,33 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
});
((ViewGroup) view).addView(baseContainer);
if (nextSegment != null) {
double walkDist = (long) getWalkDistance(segment, nextSegment, segment.walkDist);
if (walkDist > 0) {
int walkTime = (int) getWalkTime(segment, nextSegment, walkDist, walkSpeed);
if (walkTime < 60) {
walkTime = 60;
}
spannable = new SpannableStringBuilder("~");
spannable.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, nightMode ? R.color.secondary_text_dark : R.color.secondary_text_light)), 0, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
startIndex = spannable.length();
spannable.append(OsmAndFormatter.getFormattedDuration(walkTime, app)).append(" ");
spannable.setSpan(new CustomTypefaceSpan(typeface), startIndex, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
startIndex = spannable.length();
spannable.append(getString(R.string.shared_string_walk)).append(", ").append(OsmAndFormatter.getFormattedDistance((float) walkDist, app));
spannable.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, nightMode ? R.color.secondary_text_dark : R.color.secondary_text_light)), startIndex, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
buildRowDivider(view, true);
buildWalkRow(view, spannable, null, new OnClickListener() {
@Override
public void onClick(View v) {
showWalkingRouteOnMap(segment, nextSegment);
}
});
startTime[0] += walkTime;
}
}
}
private View createImagesContainer() {
@ -739,93 +769,29 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
}
private void buildTransportRouteRow(ViewGroup parent, TransportRouteResult routeResult, boolean showDivider) {
Typeface typeface = FontCache.getRobotoMedium(app);
TargetPointsHelper targetPointsHelper = app.getTargetPointsHelper();
TargetPoint startPoint = targetPointsHelper.getPointToStart();
TargetPoint endPoint = targetPointsHelper.getPointToNavigate();
long startTime = System.currentTimeMillis() / 1000;
int[] startTime = { 0 };
List<TransportRouteResultSegment> segments = routeResult.getSegments();
boolean previousWalkItemUsed = false;
for (int i = 0; i < segments.size(); i++) {
boolean first = i == 0;
boolean last = i == segments.size() - 1;
final TransportRouteResultSegment segment = segments.get(i);
final TransportRouteResultSegment nextSegment = segments.size() > i + 1 ? segments.get(i + 1) : null;
long walkTime = (long) getWalkTime(segment.walkDist, routeResult.getWalkSpeed());
if (walkTime < 60) {
walkTime = 60;
}
if (i == 0) {
if (first) {
buildStartItem(parent, startPoint, startTime, segment, routeResult.getWalkSpeed());
startTime += walkTime;
} else if (segment.walkDist > 0 && !previousWalkItemUsed) {
SpannableStringBuilder spannable = new SpannableStringBuilder("~");
int startIndex = spannable.length();
spannable.append(OsmAndFormatter.getFormattedDuration((int) walkTime, app)).append(" ");
spannable.setSpan(new CustomTypefaceSpan(typeface), startIndex, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
spannable.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, nightMode ? R.color.primary_text_dark : R.color.primary_text_light)), startIndex, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
spannable.append(getString(R.string.on_foot)).append(" ").append(", ").append(OsmAndFormatter.getFormattedDistance((float) segment.walkDist, app));
buildWalkRow(parent, spannable, null, new OnClickListener() {
@Override
public void onClick(View v) {
showWalkingRouteOnMap(segment, nextSegment);
}
});
buildRowDivider(parent, true);
startTime += walkTime;
}
buildSegmentItem(parent, segment, startTime);
double finishWalkDist = routeResult.getFinishWalkDist();
if (i == segments.size() - 1) {
buildSegmentItem(parent, segment, !last ? segments.get(i + 1) : null, startTime, routeResult.getWalkSpeed(), routeResult.getChangeTime());
if (last) {
buildDestinationItem(parent, endPoint, startTime, segment, routeResult.getWalkSpeed());
} else if (finishWalkDist > 0) {
walkTime = (long) getWalkTime(finishWalkDist, routeResult.getWalkSpeed());
startTime += walkTime;
if (nextSegment != null) {
if (nextSegment.walkDist > 0) {
finishWalkDist += nextSegment.walkDist;
walkTime += getWalkTime(nextSegment.walkDist, routeResult.getWalkSpeed());
previousWalkItemUsed = true;
} else {
previousWalkItemUsed = false;
}
}
buildRowDivider(parent, true);
Spannable title = getWalkTitle(finishWalkDist, walkTime);
buildWalkRow(parent, title, null, new OnClickListener() {
@Override
public void onClick(View v) {
showWalkingRouteOnMap(segment, nextSegment);
}
});
}
if (showDivider && i != segments.size() - 1) {
if (showDivider && !last) {
buildRowDivider(parent, true);
}
}
}
private Spannable getWalkTitle(double finishWalkDist, double walkTime) {
if (walkTime < 60) {
walkTime = 60;
}
Typeface typeface = FontCache.getRobotoMedium(app);
SpannableStringBuilder title = new SpannableStringBuilder("~");
int startIndex = title.length();
title.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, nightMode ? R.color.secondary_text_dark : R.color.secondary_text_light)), 0, title.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
title.append(OsmAndFormatter.getFormattedDuration((int) walkTime, app)).append(" ");
title.setSpan(new CustomTypefaceSpan(typeface), startIndex, title.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
startIndex = title.length();
title.append(getString(R.string.on_foot)).append(", ").append(OsmAndFormatter.getFormattedDistance((float) finishWalkDist, app));
title.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, nightMode ? R.color.secondary_text_dark : R.color.secondary_text_light)), startIndex, title.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
return title;
}
private void buildStartItem(View view, final TargetPoint start, long startTime,
private void buildStartItem(View view, final TargetPoint start, int[] startTime,
final TransportRouteResultSegment segment, double walkSpeed) {
FrameLayout baseItemView = new FrameLayout(view.getContext());
@ -843,7 +809,7 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
name = getString(R.string.shared_string_my_location);
}
Spannable startTitle = new SpannableString(name);
String text = OsmAndFormatter.getFormattedTime(startTime, false);
String text = OsmAndFormatter.getFormattedDurationShortMinutes(startTime[0]);
int drawableId = start == null ? R.drawable.ic_action_location_color : R.drawable.list_startpoint;
Drawable icon = app.getUIUtilities().getIcon(drawableId);
@ -857,17 +823,19 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
addWalkRouteIcon(imagesContainer);
buildRowDivider(infoContainer, true);
long walkTime = (long) getWalkTime(segment.walkDist, walkSpeed);
double walkDist = (long) getWalkDistance(null, segment, segment.walkDist);
int walkTime = (int) getWalkTime(null, segment, walkDist, walkSpeed);
if (walkTime < 60) {
walkTime = 60;
}
SpannableStringBuilder title = new SpannableStringBuilder(Algorithms.capitalizeFirstLetter(getString(R.string.on_foot)));
startTime[0] += walkTime;
SpannableStringBuilder title = new SpannableStringBuilder(Algorithms.capitalizeFirstLetter(getString(R.string.shared_string_walk)));
title.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, nightMode ? R.color.secondary_text_dark : R.color.secondary_text_light)), 0, title.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
int startIndex = title.length();
title.append(" ").append(OsmAndFormatter.getFormattedDuration((int) walkTime, app));
title.append(" ").append(OsmAndFormatter.getFormattedDuration(walkTime, app));
title.setSpan(new CustomTypefaceSpan(FontCache.getRobotoMedium(app)), startIndex, title.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
startIndex = title.length();
title.append(", ").append(OsmAndFormatter.getFormattedDistance((float) segment.walkDist, app));
title.append(", ").append(OsmAndFormatter.getFormattedDistance((float) walkDist, app));
title.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, nightMode ? R.color.secondary_text_dark : R.color.secondary_text_light)), startIndex, title.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
buildWalkRow(infoContainer, title, imagesContainer, new OnClickListener() {
@ -882,9 +850,9 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
}
public void showLocationOnMap(LatLon latLon) {
OsmandSettings settings = app.getSettings();
if (latLon == null) {
latLon = settings.isLastKnownMapLocation() ? settings.getLastKnownMapLocation() : null;
Location lastLocation = app.getLocationProvider().getLastKnownLocation();
if (latLon == null && lastLocation != null) {
latLon = new LatLon(lastLocation.getLatitude(), lastLocation.getLongitude());
}
if (latLon != null) {
openMenuHeaderOnly();
@ -934,7 +902,8 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
container.addView(walkLineImage);
}
private void buildDestinationItem(View view, final TargetPoint destination, long startTime, final TransportRouteResultSegment segment, double walkSpeed) {
private void buildDestinationItem(View view, final TargetPoint destination, int[] startTime,
final TransportRouteResultSegment segment, double walkSpeed) {
Typeface typeface = FontCache.getRobotoMedium(app);
FrameLayout baseItemView = new FrameLayout(view.getContext());
@ -946,17 +915,18 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
buildRowDivider(infoContainer, true);
long walkTime = (long) getWalkTime(segment.walkDist, walkSpeed);
double walkDist = (long) getWalkDistance(segment, null, segment.walkDist);
int walkTime = (int) getWalkTime(segment, null, walkDist, walkSpeed);
if (walkTime < 60) {
walkTime = 60;
}
SpannableStringBuilder spannable = new SpannableStringBuilder("~");
spannable.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, nightMode ? R.color.secondary_text_dark : R.color.secondary_text_light)), 0, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
int startIndex = spannable.length();
spannable.append(OsmAndFormatter.getFormattedDuration((int) walkTime, app)).append(" ");
spannable.append(OsmAndFormatter.getFormattedDuration(walkTime, app)).append(" ");
spannable.setSpan(new CustomTypefaceSpan(typeface), startIndex, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
startIndex = spannable.length();
spannable.append(getString(R.string.on_foot)).append(", ").append(OsmAndFormatter.getFormattedDistance((float) segment.walkDist, app));
spannable.append(getString(R.string.shared_string_walk)).append(", ").append(OsmAndFormatter.getFormattedDistance((float) walkDist, app));
spannable.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, nightMode ? R.color.secondary_text_dark : R.color.secondary_text_light)), startIndex, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
buildWalkRow(infoContainer, spannable, imagesContainer, new OnClickListener() {
@ -968,7 +938,7 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
buildRowDivider(infoContainer, true);
addWalkRouteIcon(imagesContainer);
String timeStr = OsmAndFormatter.getFormattedTime(startTime + walkTime, false);
String timeStr = OsmAndFormatter.getFormattedDurationShortMinutes(startTime[0] + walkTime);
String name = getRoutePointDescription(destination.point, destination.getOnlyName());
SpannableString title = new SpannableString(name);
title.setSpan(new CustomTypefaceSpan(typeface), 0, title.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
@ -1650,8 +1620,22 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
return "";
}
private double getWalkTime(double walkDist, double walkSpeed) {
return walkDist / walkSpeed;
private double getWalkTime(@Nullable TransportRouteResultSegment segment,
@Nullable TransportRouteResultSegment nextSegment, double walkDistPT, double walkSpeedPT) {
RouteCalculationResult walkingRouteSegment = app.getTransportRoutingHelper().getWalkingRouteSegment(segment, nextSegment);
if (walkingRouteSegment != null) {
return walkingRouteSegment.getRoutingTime();
}
return walkDistPT / walkSpeedPT;
}
private double getWalkDistance(@Nullable TransportRouteResultSegment segment,
@Nullable TransportRouteResultSegment nextSegment, double walkDistPT) {
RouteCalculationResult walkingRouteSegment = app.getTransportRoutingHelper().getWalkingRouteSegment(segment, nextSegment);
if (walkingRouteSegment != null) {
return walkingRouteSegment.getWholeDistance();
}
return walkDistPT;
}
public void buildRowDivider(View view, boolean needMargin) {
@ -1678,12 +1662,17 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
}
private List<Incline> createInclinesAndAdd100MetersWith0Incline(List<Entry> entries) {
float minIncline = 0;
float maxIncline = 0;
int size = entries.size();
List<Incline> inclines = new ArrayList<>();
for (Entry entry : entries) {
Incline incline = new Incline(entry.getY(), entry.getX() * 1000);
inclines.add(incline);
float inclineValue = entry.getY();
maxIncline = Math.max(inclineValue, maxIncline);
minIncline = Math.min(inclineValue, minIncline);
Incline incline = new Incline(inclineValue, entry.getX() * 1000);
inclines.add(incline);
}
for (int i = 0; i < 10; i++) {
float distance = i * 5;
@ -1694,6 +1683,9 @@ public class ShowRouteInfoDialogFragment extends BaseOsmAndFragment implements P
float distance = lastDistance * 1000f + i * 5f;
inclines.add(new Incline(0f, distance));
}
for (Incline incline : inclines) {
incline.computeBoundaries(minIncline, maxIncline);
}
return inclines;
}

View file

@ -85,7 +85,7 @@ public class PublicTransportCard extends BaseCard {
TextView wayLine = (TextView) view.findViewById(R.id.way_line);
fromLine.setText(getFirstLineDescrSpan());
wayLine.setText(getSecondLineDescrSpan());
wayLine.setText(getSecondLineDescrSpan(segments));
FrameLayout detailsButton = (FrameLayout) view.findViewById(R.id.details_button);
TextView detailsButtonDescr = (TextView) view.findViewById(R.id.details_button_descr);
@ -171,27 +171,37 @@ public class PublicTransportCard extends BaseCard {
return firstLineDesc;
}
private SpannableString getSecondLineDescrSpan() {
private SpannableString getSecondLineDescrSpan(List<TransportRouteResultSegment> segments) {
TransportRoutingHelper transportRoutingHelper = app.getTransportRoutingHelper();
Typeface typeface = FontCache.getRobotoMedium(app);
String travelTime = OsmAndFormatter.getFormattedDuration((int) routeResult.getTravelTime(), app);
String walkTime = OsmAndFormatter.getFormattedDuration((int) routeResult.getWalkTime(), app);
String walkDistance = OsmAndFormatter.getFormattedDistance((int) routeResult.getWalkDist(), app);
int walkTimeReal = transportRoutingHelper.getWalkingTime(segments);
int walkTimePT = (int) routeResult.getWalkTime();
int walkTime = walkTimeReal > 0 ? walkTimeReal : walkTimePT;
String walkTimeStr = OsmAndFormatter.getFormattedDuration(walkTime, app);
int walkDistanceReal = transportRoutingHelper.getWalkingDistance(segments);
int walkDistancePT = (int) routeResult.getWalkDist();
int walkDistance = walkDistanceReal > 0 ? walkDistanceReal : walkDistancePT;
String walkDistanceStr = OsmAndFormatter.getFormattedDistance(walkDistance, app);
int travelTime = (int) routeResult.getTravelTime() + walkTime;
String travelTimeStr = OsmAndFormatter.getFormattedDuration(travelTime, app);
int travelDist = (int) routeResult.getTravelDist() + walkDistance;
String travelDistStr = OsmAndFormatter.getFormattedDistance(travelDist, app);
String secondLine = travelTime + "" + app.getString(R.string.on_foot) + " " + walkTime + ", " + walkDistance;
String secondLine = travelTimeStr + ", " + travelDistStr + "" + app.getString(R.string.shared_string_walk) + " " + walkTimeStr + ", " + walkDistanceStr;
SpannableString secondLineDesc = new SpannableString(secondLine);
int startTravelTime = secondLine.indexOf(travelTime);
int startTravelTime = secondLine.indexOf(travelTimeStr);
secondLineDesc.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, nightMode ? R.color.primary_text_dark : R.color.primary_text_light)),
startTravelTime, startTravelTime + travelTime.length(), 0);
startTravelTime, startTravelTime + travelTimeStr.length(), 0);
secondLineDesc.setSpan(new CustomTypefaceSpan(typeface),
startTravelTime, startTravelTime + travelTime.length(), 0);
startTravelTime, startTravelTime + travelTimeStr.length(), 0);
int startWalkTime = secondLine.lastIndexOf(walkTime);
int startWalkTime = secondLine.lastIndexOf(walkTimeStr);
secondLineDesc.setSpan(new ForegroundColorSpan(ContextCompat.getColor(app, nightMode ? R.color.primary_text_dark : R.color.primary_text_light)),
startWalkTime, startWalkTime + walkTime.length(), 0);
startWalkTime, startWalkTime + walkTimeStr.length(), 0);
secondLineDesc.setSpan(new CustomTypefaceSpan(typeface),
startWalkTime, startWalkTime + walkTime.length(), 0);
startWalkTime, startWalkTime + walkTimeStr.length(), 0);
return secondLineDesc;
}

View file

@ -20,17 +20,26 @@ import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.SettingsNavigationActivity;
import net.osmand.plus.helpers.GpxUiHelper;
import net.osmand.router.RouteStatistics;
import net.osmand.router.RouteStatistics.Boundaries;
import net.osmand.router.RouteStatistics.RouteSegmentAttribute;
import net.osmand.router.RouteStatistics.StatisticType;
import net.osmand.router.RouteStatistics.Statistics;
import net.osmand.util.Algorithms;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import static net.osmand.router.RouteStatistics.UNDEFINED_ATTR;
public class RouteInfoCard extends BaseCard {
private RouteStatistics.Statistics routeStatistics;
private Statistics routeStatistics;
private GPXUtilities.GPXTrackAnalysis analysis;
public RouteInfoCard(MapActivity mapActivity, RouteStatistics.Statistics routeStatistics, GPXUtilities.GPXTrackAnalysis analysis) {
public RouteInfoCard(MapActivity mapActivity, Statistics routeStatistics, GPXUtilities.GPXTrackAnalysis analysis) {
super(mapActivity);
this.routeStatistics = routeStatistics;
this.analysis = analysis;
@ -46,7 +55,7 @@ public class RouteInfoCard extends BaseCard {
updateHeader();
final HorizontalBarChart chart = (HorizontalBarChart) view.findViewById(R.id.chart);
GpxUiHelper.setupHorizontalGPXChart(app, chart, 5, 10, 10, true, nightMode);
BarData barData = GpxUiHelper.buildStatisticChart(app, chart, routeStatistics, analysis, true);
BarData barData = GpxUiHelper.buildStatisticChart(app, chart, routeStatistics, analysis, true, nightMode);
chart.setData(barData);
LinearLayout container = view.findViewById(R.id.route_items);
attachLegend(container, routeStatistics);
@ -62,23 +71,25 @@ public class RouteInfoCard extends BaseCard {
}
private String getInfoType() {
if (routeStatistics.getStatisticType() == RouteStatistics.StatisticType.CLASS) {
if (routeStatistics.getStatisticType() == StatisticType.CLASS) {
return app.getString(R.string.road_types);
} else if (routeStatistics.getStatisticType() == RouteStatistics.StatisticType.STEEPNESS) {
} else if (routeStatistics.getStatisticType() == StatisticType.STEEPNESS) {
return app.getString(R.string.route_steepness_stat_container);
} else if (routeStatistics.getStatisticType() == RouteStatistics.StatisticType.SMOOTHNESS) {
} else if (routeStatistics.getStatisticType() == StatisticType.SMOOTHNESS) {
return app.getString(R.string.route_smoothness_stat_container);
} else if (routeStatistics.getStatisticType() == RouteStatistics.StatisticType.SURFACE) {
} else if (routeStatistics.getStatisticType() == StatisticType.SURFACE) {
return app.getString(R.string.route_surface_stat_container);
} else {
return "";
}
}
private <E> void attachLegend(ViewGroup container, RouteStatistics.Statistics<E> routeStatistics) {
Map<E, RouteStatistics.RouteSegmentAttribute<E>> partition = routeStatistics.getPartition();
for (E key : partition.keySet()) {
RouteStatistics.RouteSegmentAttribute<E> segment = partition.get(key);
private <E> void attachLegend(ViewGroup container, Statistics<E> routeStatistics) {
Map<E, RouteSegmentAttribute<E>> partition = routeStatistics.getPartition();
List<E> list = new ArrayList<E>(partition.keySet());
sortRouteSegmentAttributes(list);
for (E key : list) {
RouteSegmentAttribute<E> segment = partition.get(key);
int color = segment.getColor();
Drawable circle = app.getUIUtilities().getPaintedIcon(R.drawable.ic_action_circle, color);
String propertyName = segment.getPropertyName();
@ -98,7 +109,30 @@ public class RouteInfoCard extends BaseCard {
}
}
private Spannable getSpanLegend(String title, RouteStatistics.RouteSegmentAttribute segment) {
private <E> void sortRouteSegmentAttributes(List<E> list) {
Collections.sort(list, new Comparator<E>() {
@Override
public int compare(E o1, E o2) {
if (o1 instanceof String && o2 instanceof String) {
String name1 = (String) o1;
String name2 = (String) o2;
if (name1.equalsIgnoreCase(UNDEFINED_ATTR)) {
return 1;
}
if (name2.equalsIgnoreCase(UNDEFINED_ATTR)) {
return -1;
}
return name1.compareTo(name2);
} else if (o1 instanceof Boundaries && o2 instanceof Boundaries) {
return ((Boundaries) o1).compareTo((Boundaries) o2);
}
return 0;
}
});
}
private Spannable getSpanLegend(String title, RouteSegmentAttribute segment) {
String formattedDistance = OsmAndFormatter.getFormattedDistance(segment.getDistance(), getMyApplication());
title = Algorithms.capitalizeFirstLetter(title);
SpannableStringBuilder spannable = new SpannableStringBuilder(title);

View file

@ -23,7 +23,7 @@ import net.osmand.plus.wikipedia.WikipediaDialogFragment;
public class WarningCard extends BaseCard {
public static final String OSMAND_BLOG_LINK = "https://osmand.net/blog";
public static final String OSMAND_BLOG_LINK = "https://osmand.net/blog/guideline-pt";
public WarningCard(MapActivity mapActivity) {
super(mapActivity);

View file

@ -308,6 +308,9 @@ public class RoutingHelper {
Location locationProjection = currentLocation;
if (isPublicTransportMode() && currentLocation != null && finalLocation != null &&
(targetPointsChanged || transportRoutingHelper.getStartLocation() == null)) {
lastFixedLocation = currentLocation;
lastProjection = locationProjection;
transportRoutingHelper.setApplicationMode(mode);
transportRoutingHelper.setFinalAndCurrentLocation(finalLocation,
new LatLon(currentLocation.getLatitude(), currentLocation.getLongitude()));
}
@ -943,10 +946,10 @@ public class RoutingHelper {
public void recalculateRouteDueToSettingsChange() {
clearCurrentRoute(finalLocation, intermediatePoints);
getSettings().LAST_ROUTE_APPLICATION_MODE.set(getAppMode());
if (isPublicTransportMode()) {
Location start = lastFixedLocation;
LatLon finish = finalLocation;
transportRoutingHelper.setApplicationMode(mode);
if (start != null && finish != null) {
transportRoutingHelper.setFinalAndCurrentLocation(finish,
new LatLon(start.getLatitude(), start.getLongitude()));

View file

@ -14,10 +14,12 @@ import net.osmand.osm.edit.Node;
import net.osmand.plus.ApplicationMode;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandPlugin;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.routing.RouteCalculationParams.RouteCalculationResultListener;
import net.osmand.plus.routing.RouteProvider.RouteService;
import net.osmand.plus.routing.RoutingHelper.RouteCalculationProgressCallback;
import net.osmand.router.GeneralRouter;
import net.osmand.router.RouteCalculationProgress;
import net.osmand.router.RoutingConfiguration;
import net.osmand.router.TransportRoutePlanner;
@ -35,6 +37,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentLinkedQueue;
import static net.osmand.plus.notifications.OsmandNotification.NotificationType.NAVIGATION;
@ -46,6 +49,7 @@ public class TransportRoutingHelper {
private List<WeakReference<IRouteInformationListener>> listeners = new LinkedList<>();
private OsmandApplication app;
private ApplicationMode applicationMode = ApplicationMode.PUBLIC_TRANSPORT;
private RoutingHelper routingHelper;
private List<TransportRouteResult> routes;
@ -54,7 +58,6 @@ public class TransportRoutingHelper {
private LatLon startLocation;
private LatLon endLocation;
private boolean useSchedule;
private Thread currentRunningJob;
private String lastRouteCalcError;
@ -63,6 +66,7 @@ public class TransportRoutingHelper {
private TransportRouteCalculationProgressCallback progressRoute;
public TransportRoutingHelper(@NonNull OsmandApplication app) {
this.app = app;
}
@ -79,13 +83,6 @@ public class TransportRoutingHelper {
return endLocation;
}
public boolean isUseSchedule() {
return useSchedule;
}
public void setUseSchedule(boolean useSchedule) {
this.useSchedule = useSchedule;
}
public int getCurrentRoute() {
return currentRoute;
@ -111,6 +108,50 @@ public class TransportRoutingHelper {
return null;
}
public int getWalkingTime(@NonNull List<TransportRouteResultSegment> segments) {
int res = 0;
Map<Pair<TransportRouteResultSegment, TransportRouteResultSegment>, RouteCalculationResult> walkingRouteSegments = this.walkingRouteSegments;
if (walkingRouteSegments != null) {
TransportRouteResultSegment prevSegment = null;
for (TransportRouteResultSegment segment : segments) {
RouteCalculationResult walkingRouteSegment = getWalkingRouteSegment(prevSegment, segment);
if (walkingRouteSegment != null) {
res += walkingRouteSegment.getRoutingTime();
}
prevSegment = segment;
}
if (segments.size() > 0) {
RouteCalculationResult walkingRouteSegment = getWalkingRouteSegment(segments.get(segments.size() - 1), null);
if (walkingRouteSegment != null) {
res += walkingRouteSegment.getRoutingTime();
}
}
}
return res;
}
public int getWalkingDistance(@NonNull List<TransportRouteResultSegment> segments) {
int res = 0;
Map<Pair<TransportRouteResultSegment, TransportRouteResultSegment>, RouteCalculationResult> walkingRouteSegments = this.walkingRouteSegments;
if (walkingRouteSegments != null) {
TransportRouteResultSegment prevSegment = null;
for (TransportRouteResultSegment segment : segments) {
RouteCalculationResult walkingRouteSegment = getWalkingRouteSegment(prevSegment, segment);
if (walkingRouteSegment != null) {
res += walkingRouteSegment.getWholeDistance();
}
prevSegment = segment;
}
if (segments.size() > 0) {
RouteCalculationResult walkingRouteSegment = getWalkingRouteSegment(segments.get(segments.size() - 1), null);
if (walkingRouteSegment != null) {
res += walkingRouteSegment.getWholeDistance();
}
}
}
return res;
}
public void setCurrentRoute(int currentRoute) {
this.currentRoute = currentRoute;
}
@ -144,7 +185,7 @@ public class TransportRoutingHelper {
TransportRouteCalculationParams params = new TransportRouteCalculationParams();
params.start = start;
params.end = end;
params.useSchedule = useSchedule;
params.mode = applicationMode;
params.type = RouteService.OSMAND;
params.ctx = app;
params.calculationProgress = new RouteCalculationProgress();
@ -158,6 +199,7 @@ public class TransportRoutingHelper {
private void startRouteCalculationThread(TransportRouteCalculationParams params) {
synchronized (this) {
final Thread prevRunningJob = currentRunningJob;
app.getSettings().LAST_ROUTE_APPLICATION_MODE.set(routingHelper.getAppMode());
RouteRecalculationThread newThread =
new RouteRecalculationThread("Calculating public transport route", params);
currentRunningJob = newThread;
@ -315,6 +357,10 @@ public class TransportRoutingHelper {
return r.left == 0 && r.right == 0 ? null : r;
}
public void setApplicationMode(ApplicationMode applicationMode) {
this.applicationMode = applicationMode;
}
public interface TransportRouteCalculationProgressCallback {
void start();
@ -330,8 +376,9 @@ public class TransportRoutingHelper {
public LatLon end;
public OsmandApplication ctx;
public ApplicationMode mode;
public RouteService type;
public boolean useSchedule;
public Map<String, String> params = new TreeMap<>();
public RouteCalculationProgress calculationProgress;
public TransportRouteCalculationResultListener resultListener;
@ -397,9 +444,24 @@ public class TransportRoutingHelper {
private List<TransportRouteResult> calculateRouteImpl(TransportRouteCalculationParams params) throws IOException, InterruptedException {
RoutingConfiguration.Builder config = params.ctx.getDefaultRoutingConfig();
BinaryMapIndexReader[] files = params.ctx.getResourceManager().getTransportRoutingMapFiles();
TransportRoutingConfiguration cfg = new TransportRoutingConfiguration(config);
cfg.useSchedule = params.useSchedule;
params.params.clear();
OsmandSettings settings = params.ctx.getSettings();
for(Map.Entry<String, GeneralRouter.RoutingParameter> e : config.getRouter(params.mode.getStringKey()).getParameters().entrySet()){
String key = e.getKey();
GeneralRouter.RoutingParameter pr = e.getValue();
String vl;
if(pr.getType() == GeneralRouter.RoutingParameterType.BOOLEAN) {
OsmandSettings.CommonPreference<Boolean> pref = settings.getCustomRoutingBooleanProperty(key, pr.getDefaultBoolean());
Boolean bool = pref.getModeValue(params.mode);
vl = bool ? "true" : null;
} else {
vl = settings.getCustomRoutingProperty(key, "").getModeValue(params.mode);
}
if(vl != null && vl.length() > 0) {
params.params.put(key, vl);
}
}
TransportRoutingConfiguration cfg = new TransportRoutingConfiguration(config, params.params);
TransportRoutePlanner planner = new TransportRoutePlanner();
TransportRoutingContext ctx = new TransportRoutingContext(cfg, files);
ctx.calculationProgress = params.calculationProgress;