From 5f60f452c0678813699f4e1d72c26c0bbf4a5b09 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 7 Jul 2020 10:24:29 +0300 Subject: [PATCH] Change gradient parameters names --- .../src/main/java/net/osmand/GPXUtilities.java | 18 +++++++++--------- .../net/osmand/plus/GpxSelectionHelper.java | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java b/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java index c1ad5d5cef..916e279160 100644 --- a/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java +++ b/OsmAnd-java/src/main/java/net/osmand/GPXUtilities.java @@ -1515,9 +1515,9 @@ public class GPXUtilities { } public enum GradientScaleType { - SPEED("gradientSpeedColor"), - ALTITUDE("gradientAltitudeColor"), - SLOPE("gradientSlopeColor"); + SPEED("gradient_speed_color"), + ALTITUDE("gradient_altitude_color"), + SLOPE("gradient_slope_color"); private String typeName; @@ -1543,12 +1543,12 @@ public class GPXUtilities { } public void setGradientScaleType(GradientScaleType gradientScaleType) { - getExtensionsToWrite().put("gradientScaleType", gradientScaleType != null ? gradientScaleType.name() : null); + getExtensionsToWrite().put("gradient_scale_type", gradientScaleType != null ? gradientScaleType.name() : null); } public GradientScaleType getGradientScaleType() { if (extensions != null) { - String gradientScaleTypeName = extensions.get("gradientScaleType"); + String gradientScaleTypeName = extensions.get("gradient_scale_type"); if (!Algorithms.isEmpty(gradientScaleTypeName)) { try { return GradientScaleType.valueOf(gradientScaleTypeName); @@ -1575,25 +1575,25 @@ public class GPXUtilities { public boolean isShowArrows() { String showArrows = null; if (extensions != null) { - showArrows = extensions.get("showArrows"); + showArrows = extensions.get("show_arrows"); } return Boolean.parseBoolean(showArrows); } public void setShowArrows(boolean showArrows) { - getExtensionsToWrite().put("showArrows", String.valueOf(showArrows)); + getExtensionsToWrite().put("show_arrows", String.valueOf(showArrows)); } public boolean isShowStartFinish() { String showStartFinish = null; if (extensions != null) { - showStartFinish = extensions.get("showStartFinish"); + showStartFinish = extensions.get("show_start_finish"); } return Boolean.parseBoolean(showStartFinish); } public void setShowStartFinish(boolean showStartFinish) { - getExtensionsToWrite().put("showStartFinish", String.valueOf(showStartFinish)); + getExtensionsToWrite().put("show_start_finish", String.valueOf(showStartFinish)); } } diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index 8a288d96b5..07a183712d 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -54,9 +54,9 @@ public class GpxSelectionHelper { private static final String COLOR = "color"; private static final String WIDTH = "width"; private static final String SELECTED_BY_USER = "selected_by_user"; - private static final String SHOW_ARROWS = "showArrows"; - private static final String GRADIENT_SCALE_TYPE = "gradientScaleType"; - private static final String SHOW_START_FINISH = "showStartFinish"; + private static final String SHOW_ARROWS = "show_arrows"; + private static final String GRADIENT_SCALE_TYPE = "gradient_scale_type"; + private static final String SHOW_START_FINISH = "show_start_finish"; private OsmandApplication app; @NonNull