MaplyUpdateLayer
Objective-C
@interface MaplyUpdateLayer : MaplyControllerLayer
Swift
class MaplyUpdateLayer : MaplyControllerLayer
This layer will call a delegate as the user moves around, but constrained to distance and time.
This layer is responsible for calling a delegate you provide as the user moves their viewpoint around. You’ll be called if they move from than a certain amount, but not more often than the minimum time.
-
The minimum distance that will trigger a delegate call. Distance is in display units (radius of the earth = 1.0).
Declaration
Objective-C
@property (nonatomic, readonly) double moveDist;Swift
var moveDist: Double { get } -
The delegate will be called no more often than this amount (in seconds).
Declaration
Objective-C
@property (nonatomic, readonly) double minTime;Swift
var minTime: Double { get } -
Maximum time to go without getting an update (if things are moving)
Declaration
Objective-C
@property (nonatomic) double maxLag;Swift
var maxLag: Double { get set } -
Initalize the update layer with a delegate and parameters.
Declaration
Objective-C
- (nonnull instancetype)initWithDelegate: (NSObject<MaplyUpdateDelegate> *_Nullable)delegate moveDist:(double)moveDist minTime:(double)minTime;Swift
init(delegate: (NSObjectProtocol & MaplyUpdateDelegate)?, moveDist: Double, minTime: Double)Parameters
delegateThe delegate that will be called every time the user moves, subject to the values.
moveDistThe minimum distance that will trigger a delegate call. Distance is in display units (radius of the earth = 1.0).
minTimeThe delegate will be called no more often than this amount (in seconds).
MaplyUpdateLayer Class Reference