fix after merge
This commit is contained in:
commit
b114d4956e
2 changed files with 14 additions and 6 deletions
|
@ -369,8 +369,10 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
|||
settings.MAP_OVERLAY_PREVIOUS.set(null);
|
||||
}
|
||||
if (underlayLayer.getMap() == null) {
|
||||
settings.MAP_UNDERLAY.removeListener(underlayListener);
|
||||
settings.MAP_UNDERLAY.set(null);
|
||||
settings.MAP_UNDERLAY_PREVIOUS.set(null);
|
||||
settings.MAP_UNDERLAY.addListener(underlayListener);
|
||||
}
|
||||
String overlayMapDescr = settings.MAP_OVERLAY.get();
|
||||
if (overlayMapDescr!=null && overlayMapDescr.contains(".sqlitedb")) {
|
||||
|
|
|
@ -45,6 +45,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
import static net.osmand.plus.liveupdates.LiveUpdatesFragmentNew.getDefaultIconColorId;
|
||||
import static net.osmand.plus.myplaces.GPXTabItemType.GPX_TAB_ITEM_SPEED;
|
||||
|
||||
public class GpxBlockStatisticsBuilder {
|
||||
|
||||
|
@ -155,15 +156,20 @@ public class GpxBlockStatisticsBuilder {
|
|||
float totalDistance = withoutGaps ? analysis.totalDistanceWithoutGaps : analysis.totalDistance;
|
||||
String asc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app);
|
||||
String desc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationDown, app);
|
||||
String minElevation = OsmAndFormatter.getFormattedAlt(analysis.minElevation, app);
|
||||
String maxElevation = OsmAndFormatter.getFormattedAlt(analysis.maxElevation, app);
|
||||
String avg = OsmAndFormatter.getFormattedSpeed(analysis.avgSpeed, app);
|
||||
String max = OsmAndFormatter.getFormattedSpeed(analysis.maxSpeed, app);
|
||||
String maxSpeed = OsmAndFormatter.getFormattedSpeed(analysis.maxSpeed, app);
|
||||
float timeSpan = withoutGaps ? analysis.timeSpanWithoutGaps : analysis.timeSpan;
|
||||
long timeMoving = withoutGaps ? analysis.timeMovingWithoutGaps : analysis.timeMoving;
|
||||
prepareDataDistance(totalDistance);
|
||||
prepareDataAscent(asc);
|
||||
prepareDataDescent(desc);
|
||||
prepareDataAltitudeRange(minElevation, maxElevation);
|
||||
prepareDataAverageSpeed(avg);
|
||||
prepareDataMaximumSpeed(max);
|
||||
prepareDataMaximumSpeed(maxSpeed);
|
||||
prepareDataTimeSpan(timeSpan);
|
||||
prepareDataTimeMoving(timeMoving);
|
||||
} else {
|
||||
switch (tabItem) {
|
||||
case GPX_TAB_ITEM_GENERAL: {
|
||||
|
@ -215,8 +221,7 @@ public class GpxBlockStatisticsBuilder {
|
|||
}
|
||||
|
||||
public void prepareDataAltitudeRange(String min, String max) {
|
||||
String pattern = app.getString(R.string.ltr_or_rtl_combine_via_dash);
|
||||
prepareData(app.getString(R.string.altitude_range), String.format(pattern, min, max),
|
||||
prepareData(app.getString(R.string.altitude_range), min + " - " + max,
|
||||
R.drawable.ic_action_altitude_range_16, GPXDataSetType.ALTITUDE, null, ItemType.ITEM_ALTITUDE);
|
||||
}
|
||||
|
||||
|
@ -243,9 +248,10 @@ public class GpxBlockStatisticsBuilder {
|
|||
}
|
||||
|
||||
public void prepareDataTimeMoving(long timeMoving) {
|
||||
prepareData(app.getString(R.string.shared_string_time_moving),
|
||||
prepareData(app.getString(tabItem == GPX_TAB_ITEM_SPEED ? R.string.shared_string_time_moving : R.string.moving_time),
|
||||
Algorithms.formatDuration((int) (timeMoving / 1000), app.accessibilityEnabled()),
|
||||
R.drawable.ic_action_time_span_16, GPXDataSetType.SPEED, null, ItemType.ITEM_TIME_MOVING);
|
||||
tabItem == GPX_TAB_ITEM_SPEED ? R.drawable.ic_action_time_span_16 : R.drawable.ic_action_time_moving_16,
|
||||
GPXDataSetType.SPEED, null, ItemType.ITEM_TIME_MOVING);
|
||||
}
|
||||
|
||||
public void prepareDataDistanceCorrected(float totalDistanceMoving) {
|
||||
|
|
Loading…
Reference in a new issue