NSValue(MGLGeometryAdditions)
@interface NSValue (MGLGeometryAdditions)
Methods for round-tripping Mapbox geometry structure values.
-
Creates a new value object containing the specified Core Location geographic coordinate structure.
Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLCoordinate: (CLLocationCoordinate2D)coordinate;
Swift
convenience init(MGLCoordinate coordinate: CLLocationCoordinate2D)
Parameters
coordinate
The value for the new object.
Return Value
A new value object that contains the geographic coordinate information.
-
The Core Location geographic coordinate structure representation of the value.
Declaration
Objective-C
@property (readonly, atomic) CLLocationCoordinate2D MGLCoordinateValue;
Swift
var MGLCoordinateValue: CLLocationCoordinate2D { get }
-
Creates a new value object containing the specified Mapbox coordinate span structure.
Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLCoordinateSpan:(MGLCoordinateSpan)span;
Swift
convenience init(MGLCoordinateSpan span: MGLCoordinateSpan)
Parameters
span
The value for the new object.
Return Value
A new value object that contains the coordinate span information.
-
The Mapbox coordinate span structure representation of the value.
Declaration
Objective-C
@property (readonly, atomic) MGLCoordinateSpan MGLCoordinateSpanValue;
Swift
var MGLCoordinateSpanValue: MGLCoordinateSpan { get }
-
Creates a new value object containing the specified Mapbox coordinate bounds structure.
Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLCoordinateBounds: (MGLCoordinateBounds)bounds;
Swift
convenience init(MGLCoordinateBounds bounds: MGLCoordinateBounds)
Parameters
bounds
The value for the new object.
Return Value
A new value object that contains the coordinate bounds information.
-
The Mapbox coordinate bounds structure representation of the value.
Declaration
Objective-C
@property (readonly, atomic) MGLCoordinateBounds MGLCoordinateBoundsValue;
Swift
var MGLCoordinateBoundsValue: MGLCoordinateBounds { get }
-
Creates a new value object containing the given
MGLOfflinePackProgress
structure.Declaration
Objective-C
+ (nonnull NSValue *)valueWithMGLOfflinePackProgress: (MGLOfflinePackProgress)progress;
Swift
/*not inherited*/ init(MGLOfflinePackProgress progress: MGLOfflinePackProgress)
Parameters
progress
The value for the new object.
Return Value
A new value object that contains the offline pack progress information.
-
The
MGLOfflinePackProgress
structure representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLOfflinePackProgress MGLOfflinePackProgressValue;
Swift
var MGLOfflinePackProgressValue: MGLOfflinePackProgress { get }