NSValue(MGLAdditions)
@interface NSValue (MGLAdditions)
Methods for round-tripping values for Mapbox-defined types.
-
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 map point structure.
Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLMapPoint:(MGLMapPoint)point;
Swift
convenience init(mglMapPoint point: MGLMapPoint)
Parameters
point
The value for the new object.
Return Value
A new value object that contains the coordinate and zoom level information.
-
The Mapbox map point structure representation of the value.
Declaration
Objective-C
@property (readonly, atomic) MGLMapPoint MGLMapPointValue;
Swift
var mglMapPointValue: MGLMapPoint { get }
-
Creates a new value object containing the specified Mapbox coordinate span structure.
Declaration
Objective-C
+ (nonnull instancetype)valueWithDingiCoordinateSpan:(DingiCoordinateSpan)span;
Swift
convenience init(dingiCoordinateSpan span: DingiCoordinateSpan)
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) DingiCoordinateSpan DingiCoordinateSpanValue;
Swift
var dingiCoordinateSpanValue: DingiCoordinateSpan { get }
-
Creates a new value object containing the specified Mapbox coordinate bounds structure.
Declaration
Objective-C
+ (nonnull instancetype)valueWithDingiCoordinateBounds: (DingiCoordinateBounds)bounds;
Swift
convenience init(dingiCoordinateBounds bounds: DingiCoordinateBounds)
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) DingiCoordinateBounds DingiCoordinateBoundsValue;
Swift
var dingiCoordinateBoundsValue: DingiCoordinateBounds { get }
-
Creates a new value object containing the specified Mapbox coordinate quad structure.
Declaration
Objective-C
+ (nonnull instancetype)valueWithDingiCoordinateQuad:(DingiCoordinateQuad)quad;
Swift
convenience init(dingiCoordinateQuad quad: DingiCoordinateQuad)
Parameters
quad
The value for the new object.
Return Value
A new value object that contains the coordinate quad information.
-
The Mapbox coordinate quad structure representation of the value.
Declaration
Objective-C
- (DingiCoordinateQuad)DingiCoordinateQuadValue;
Swift
func dingiCoordinateQuadValue() -> DingiCoordinateQuad
-
Creates a new value object containing the given
DingiOfflinePackProgress
structure.Declaration
Objective-C
+ (nonnull NSValue *)valueWithDingiOfflinePackProgress: (DingiOfflinePackProgress)progress;
Swift
/*not inherited*/ init(dingiOfflinePackProgress progress: DingiOfflinePackProgress)
Parameters
progress
The value for the new object.
Return Value
A new value object that contains the offline pack progress information.
-
The
DingiOfflinePackProgress
structure representation of the value.Declaration
Objective-C
@property (readonly, atomic) DingiOfflinePackProgress DingiOfflinePackProgressValue;
Swift
var dingiOfflinePackProgressValue: DingiOfflinePackProgress { get }
-
Creates a new value object containing the given
DingiTransition
structure.Declaration
Objective-C
+ (nonnull NSValue *)valueWithDingiTransition:(DingiTransition)transition;
Swift
/*not inherited*/ init(dingiTransition transition: DingiTransition)
Parameters
transition
The value for the new object.
Return Value
A new value object that contains the transition information.
-
The
DingiTransition
structure representation of the value.Declaration
Objective-C
@property (readonly, atomic) DingiTransition DingiTransitionValue;
Swift
var dingiTransitionValue: DingiTransition { get }
-
Creates a new value object containing the given
DingiSphericalPosition
structure.Declaration
Objective-C
+ (nonnull instancetype)valueWithDingiSphericalPosition: (DingiSphericalPosition)lightPosition;
Swift
convenience init(dingiSphericalPosition lightPosition: DingiSphericalPosition)
Parameters
lightPosition
The value for the new object.
Return Value
A new value object that contains the light position information.
-
The
DingiSphericalPosition
structure representation of the value.Declaration
Objective-C
@property (readonly, atomic) DingiSphericalPosition DingiSphericalPositionValue;
Swift
var dingiSphericalPositionValue: DingiSphericalPosition { get }
-
Creates a new value object containing the given
DingiLightAnchor
enum.Declaration
Objective-C
+ (nonnull NSValue *)valueWithDingiLightAnchor:(DingiLightAnchor)lightAnchor;
Swift
/*not inherited*/ init(dingiLightAnchor lightAnchor: DingiLightAnchor)
Parameters
lightAnchor
The value for the new object.
Return Value
A new value object that contains the light anchor information.
-
The
DingiLightAnchor
enum representation of the value.Declaration
Objective-C
@property (readonly, atomic) DingiLightAnchor DingiLightAnchorValue;
Swift
var dingiLightAnchorValue: DingiLightAnchor { get }