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
coordinateThe 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) 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
pointThe 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) MGLMapPoint MGLMapPointValue;Swift
var mglMapPointValue: MGLMapPoint { 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
spanThe 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) 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
boundsThe 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) MGLCoordinateBounds MGLCoordinateBoundsValue;Swift
var mglCoordinateBoundsValue: MGLCoordinateBounds { get } -
Creates a new value object containing the specified Mapbox coordinate quad structure.
Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLCoordinateQuad:(MGLCoordinateQuad)quad;Swift
convenience init(mglCoordinateQuad quad: MGLCoordinateQuad)Parameters
quadThe 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
- (MGLCoordinateQuad)MGLCoordinateQuadValue;Swift
func mglCoordinateQuadValue() -> MGLCoordinateQuad
-
Creates a new value object containing the given
MGLOfflinePackProgressstructure.Declaration
Objective-C
+ (nonnull NSValue *)valueWithMGLOfflinePackProgress: (MGLOfflinePackProgress)progress;Swift
/*not inherited*/ init(mglOfflinePackProgress progress: MGLOfflinePackProgress)Parameters
progressThe value for the new object.
Return Value
A new value object that contains the offline pack progress information.
-
The
MGLOfflinePackProgressstructure representation of the value.Declaration
Objective-C
@property (readonly) MGLOfflinePackProgress MGLOfflinePackProgressValue;Swift
var mglOfflinePackProgressValue: MGLOfflinePackProgress { get }
-
Creates a new value object containing the given
MGLTransitionstructure.Declaration
Objective-C
+ (nonnull NSValue *)valueWithMGLTransition:(MGLTransition)transition;Swift
/*not inherited*/ init(mglTransition transition: MGLTransition)Parameters
transitionThe value for the new object.
Return Value
A new value object that contains the transition information.
-
The
MGLTransitionstructure representation of the value.Declaration
Objective-C
@property (readonly) MGLTransition MGLTransitionValue;Swift
var mglTransitionValue: MGLTransition { get } -
Creates a new value object containing the given
MGLSphericalPositionstructure.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLSphericalPosition: (MGLSphericalPosition)lightPosition;Swift
convenience init(mglSphericalPosition lightPosition: MGLSphericalPosition)Parameters
lightPositionThe value for the new object.
Return Value
A new value object that contains the light position information.
-
The
MGLSphericalPositionstructure representation of the value.Declaration
Objective-C
@property (readonly) MGLSphericalPosition MGLSphericalPositionValue;Swift
var mglSphericalPositionValue: MGLSphericalPosition { get } -
Creates a new value object containing the given
MGLLightAnchorenum.Declaration
Objective-C
+ (nonnull NSValue *)valueWithMGLLightAnchor:(MGLLightAnchor)lightAnchor;Swift
/*not inherited*/ init(mglLightAnchor lightAnchor: MGLLightAnchor)Parameters
lightAnchorThe value for the new object.
Return Value
A new value object that contains the light anchor information.
-
The
MGLLightAnchorenum representation of the value.Declaration
Objective-C
@property (readonly) MGLLightAnchor MGLLightAnchorValue;Swift
var mglLightAnchorValue: MGLLightAnchor { get }
Install in Dash
NSValue(MGLAdditions) Category Reference