fix empty altitude in favorites;

This commit is contained in:
Skalii 2021-03-30 17:33:38 +03:00
parent 369ce31d8c
commit a24d5e607a
3 changed files with 5 additions and 4 deletions

View file

@ -38,7 +38,7 @@ public class RouteDataObject {
public int[] nameIds;
// mixed array [0, height, cumulative_distance height, cumulative_distance, height, ...] - length is length(points)*2
public float[] heightDistanceArray = null;
public float heightByCurrentLocation;
public float heightByCurrentLocation = Float.NaN;
private static final Log LOG = PlatformUtil.getLog(RouteDataObject.class);
public RouteDataObject(RouteRegion region) {
@ -185,7 +185,8 @@ public class RouteDataObject {
heightDistanceArray = new float[2 * getPointsLength()];
double plon = 0;
double plat = 0;
float prevHeight = heightByCurrentLocation = startHeight;
float prevHeight = startHeight;
heightByCurrentLocation = Float.NaN;
double prevDistance = 0;
for (int k = 0; k < getPointsLength(); k++) {
double lon = MapUtils.get31LongitudeX(getPoint31XTile(k));

View file

@ -45,7 +45,7 @@ public class FavouritePoint implements Serializable, LocationPoint {
private boolean visible = true;
private SpecialPointType specialPointType = null;
private BackgroundType backgroundType = null;
private double altitude;
private double altitude = Double.NaN;
private long timestamp;
public FavouritePoint() {

View file

@ -1036,7 +1036,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
title = "";
}
String originObjectName = "";
double altitude = 0;
double altitude = Double.NaN;
long timestamp = System.currentTimeMillis();
Object object = getObject();
if (object != null) {