[ios] return the ElevationInfo for the current track recording
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
parent
d21800ec25
commit
15fb80a43e
2 changed files with 9 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
@class MWMMapSearchResult;
|
||||
@class TrackInfo;
|
||||
@class ElevationProfileData;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, MWMZoomMode) { MWMZoomModeIn = 0, MWMZoomModeOut };
|
||||
|
||||
|
@ -28,6 +29,9 @@ typedef void (^TrackRecordingUpdatedHandler)(TrackInfo * _Nonnull trackInfo);
|
|||
+ (void)saveTrackRecordingWithName:(nullable NSString *)name;
|
||||
+ (BOOL)isTrackRecordingEnabled;
|
||||
+ (BOOL)isTrackRecordingEmpty;
|
||||
/// Returns current track recording elevation info.
|
||||
/// If the track recording is not in progress, returns empty ElevationProfileData.
|
||||
+ (ElevationProfileData * _Nonnull)trackRecordingElevationInfo;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#import "ProductsConfiguration+Core.h"
|
||||
#import "Product+Core.h"
|
||||
#import "TrackInfo+Core.h"
|
||||
#import "ElevationProfileData+Core.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
|
@ -246,6 +247,10 @@ static Framework::ProductsPopupCloseReason ConvertProductPopupCloseReasonToCore(
|
|||
return GetFramework().IsTrackRecordingEmpty();
|
||||
}
|
||||
|
||||
+ (ElevationProfileData * _Nonnull)trackRecordingElevationInfo {
|
||||
return [[ElevationProfileData alloc] initWithElevationInfo:GetFramework().GetTrackRecordingCurrentElevationInfo()];
|
||||
}
|
||||
|
||||
// MARK: - ProductsManager
|
||||
|
||||
+ (nullable ProductsConfiguration *)getProductsConfiguration {
|
||||
|
|
Reference in a new issue