GLRouteElevation
Objective-C
@interface GLRouteElevation : NSObject
Swift
class GLRouteElevation : NSObject
GLRouteElevation
is a class that loads and models height data for a route.
-
Requests the height profile for the specified points.
Declaration
Objective-C
+ (int64_t)requestHeightWithPoints:(GLMapGeoPoint *_Nonnull)points count:(NSUInteger)count completionBlock: (GLMapHeightDataCompletionBlock _Nonnull)completionBlock;
Swift
class func requestHeight(withPoints points: UnsafeMutablePointer<GLMapGeoPoint>, count: UInt, completionBlock: @escaping GLMapHeightDataCompletionBlock) -> Int64
Parameters
points
where height is needed
count
number of points
completionBlock
block that is called when request is finished or cancelled
-
Requests the height profile for the points in the specified route.
Declaration
Objective-C
+ (int64_t)requestHeightForRoute:(GLRoute *_Nonnull)route completionBlock: (GLMapHeightDataCompletionBlock _Nullable)completionBlock;
Swift
class func requestHeight(for route: GLRoute, completionBlock: GLMapHeightDataCompletionBlock? = nil) -> Int64
Parameters
route
route to update with height information
completionBlock
block that is called when request is finished or cancelled
-
Requests the height profile for the points in the specified route using offline data.
Declaration
Objective-C
+ (int64_t)requestOfflineHeightForRoute:(GLRoute *_Nonnull)route allowPartial:(BOOL)allowPartial completionBlock: (GLMapHeightDataCompletionBlock _Nullable) completionBlock;
Swift
class func requestOfflineHeight(for route: GLRoute, allowPartial: Bool, completionBlock: GLMapHeightDataCompletionBlock? = nil) -> Int64
Parameters
route
route to update with height information
allowPartial
when ‘false’ request will fail if any tile with height data is absent
completionBlock
block that is called when request is finished or cancelled
-
Cancels request that was started
Declaration
Objective-C
+ (void)cancelRequest:(int64_t)requestID;
Swift
class func cancel(_ requestID: Int64)
Parameters
requestID
ID of request to cancel
-
Minimal value
Declaration
Objective-C
@property (readonly) double min;
Swift
var min: Double { get }
-
Maximum value
Declaration
Objective-C
@property (readonly) double max;
Swift
var max: Double { get }
-
Returns height at given point index
Declaration
Objective-C
- (double)heightAtIndex:(uint32_t)index;
Swift
func height(at index: UInt32) -> Double
Parameters
index
index of point
Return Value
Returns height at given point