diff --git a/android/jni/com/mapswithme/maps/Framework.cpp b/android/jni/com/mapswithme/maps/Framework.cpp index 8c4ac1a82f..335876c4d5 100644 --- a/android/jni/com/mapswithme/maps/Framework.cpp +++ b/android/jni/com/mapswithme/maps/Framework.cpp @@ -1107,8 +1107,8 @@ Java_com_mapswithme_maps_Framework_nativeGenerateRouteAltitudeChartBits(JNIEnv * ASSERT(fr, ()); feature::TAltitudes altitudes; - vector segDistanceM; - if (!fr->GetRoutingManager().GetRouteAltitudesAndDistancesM(segDistanceM, altitudes)) + vector routePointDistanceM; + if (!fr->GetRoutingManager().GetRouteAltitudesAndDistancesM(routePointDistanceM, altitudes)) { LOG(LWARNING, ("Can't get distance to route points and altitude.")); return nullptr; @@ -1119,7 +1119,7 @@ Java_com_mapswithme_maps_Framework_nativeGenerateRouteAltitudeChartBits(JNIEnv * int32_t maxRouteAltitude = 0; measurement_utils::Units units = measurement_utils::Units::Metric; if (!fr->GetRoutingManager().GenerateRouteAltitudeChart( - width, height, altitudes, segDistanceM, imageRGBAData, + width, height, altitudes, routePointDistanceM, imageRGBAData, minRouteAltitude, maxRouteAltitude, units)) { LOG(LWARNING, ("Can't generate route altitude image.")); diff --git a/iphone/Maps/Core/Routing/MWMRouter.mm b/iphone/Maps/Core/Routing/MWMRouter.mm index 945dc6488b..2696578d96 100644 --- a/iphone/Maps/Core/Routing/MWMRouter.mm +++ b/iphone/Maps/Core/Routing/MWMRouter.mm @@ -526,12 +526,12 @@ void logPointEvent(MWMRoutePoint * point, NSString * eventType) if (![self hasRouteAltitude]) return; - auto segDistanceM = std::make_shared>(std::vector()); + auto routePointDistanceM = std::make_shared>(std::vector()); auto altitudes = std::make_shared(feature::TAltitudes()); - if (!GetFramework().GetRoutingManager().GetRouteAltitudesAndDistancesM(*segDistanceM, *altitudes)) + if (!GetFramework().GetRoutingManager().GetRouteAltitudesAndDistancesM(*routePointDistanceM, *altitudes)) return; - // Note. |segDistanceM| and |altitudes| should not be used in the method after line below. + // Note. |routePointDistanceM| and |altitudes| should not be used in the method after line below. dispatch_async(self.router.renderAltitudeImagesQueue, [=] () { auto router = self.router; CGFloat const screenScale = [UIScreen mainScreen].scale; @@ -554,7 +554,7 @@ void logPointEvent(MWMRoutePoint * point, NSString * eventType) if(!GetFramework().GetRoutingManager().GenerateRouteAltitudeChart(width, height, *altitudes, - *segDistanceM, + *routePointDistanceM, imageRGBAData, minRouteAltitude, maxRouteAltitude, units))