MaplyViewTracker

Objective-C

@interface MaplyViewTracker : NSObject

Swift

class MaplyViewTracker : NSObject

The View Tracker associates a view with a geographic location.

The Maply View Tracker will move a UIView around to keep track of a geographic location. This is basically used for popups. The system will move the view around at the end of the frame render. It will hide the UIView if needed or make it reappear. The UIView should be a child of view controller’s view.

  • The UIView we want moved around.

    This is the UIView we’ll tie to the geographic location. If you want to center it, use offsets within the UIView.

    Declaration

    Objective-C

    @property (nonatomic, strong) UIView *__nullable view

    Swift

    var view: UnsafeMutablePointer<Int32>? { get set }
  • loc

    The geographic location where we want to place the UIView.

    This is the location (lon/lat in radians) where we want to stick the UIView. The location on screen will be updated as the user manipulates the map or globe.

    Declaration

    Objective-C

    @property (nonatomic) MaplyCoordinate loc;

    Swift

    var loc: MaplyCoordinate { get set }
  • An offset in screen space for the view tracker.

    This offset is added to the location after it’s projected into screen space.

    Declaration

    Objective-C

    @property (nonatomic) CGPoint offset;

    Swift

    var offset: CGPoint { get set }
  • The lowest height at which we’ll see the view tracker.

    This value is in display coordinates.

    Declaration

    Objective-C

    @property (nonatomic) float minVis;

    Swift

    var minVis: Float { get set }
  • the maximum height at which we’ll see the view being tracked.

    This value is in display coordinates.

    Declaration

    Objective-C

    @property (nonatomic) float maxVis;

    Swift

    var maxVis: Float { get set }