mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[ios] return the ElevationInfo for the current track recording
Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
committed by
Yannik Bloscheck
parent
48353637ac
commit
5d0b8f1c04
@@ -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"
|
||||
|
||||
@@ -250,6 +251,10 @@ static Framework::ProductsPopupCloseReason ConvertProductPopupCloseReasonToCore(
|
||||
return GetFramework().IsTrackRecordingEmpty();
|
||||
}
|
||||
|
||||
+ (ElevationProfileData * _Nonnull)trackRecordingElevationInfo {
|
||||
return [[ElevationProfileData alloc] initWithElevationInfo:GetFramework().GetTrackRecordingCurrentElevationInfo()];
|
||||
}
|
||||
|
||||
// MARK: - ProductsManager
|
||||
|
||||
+ (nullable ProductsConfiguration *)getProductsConfiguration {
|
||||
|
||||
Reference in New Issue
Block a user