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 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 }
-
Creates a new value object containing the given
MGLLineCap
enumeration.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLLineCap:(MGLLineCap)lineCap;
Swift
convenience init(mglLineCap lineCap: MGLLineCap)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLLineCap
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLLineCap MGLLineCapValue;
Swift
var mglLineCapValue: MGLLineCap { get }
-
Creates a new value object containing the given
MGLLineJoin
enumeration.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLLineJoin:(MGLLineJoin)lineJoin;
Swift
convenience init(mglLineJoin lineJoin: MGLLineJoin)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLLineJoin
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLLineJoin MGLLineJoinValue;
Swift
var mglLineJoinValue: MGLLineJoin { get }
-
Creates a new value object containing the given
MGLIconRotationAlignment
enumeration.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLIconRotationAlignment: (MGLIconRotationAlignment)iconRotationAlignment;
Swift
convenience init(mglIconRotationAlignment iconRotationAlignment: MGLIconRotationAlignment)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLIconRotationAlignment
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLIconRotationAlignment MGLIconRotationAlignmentValue;
Swift
var mglIconRotationAlignmentValue: MGLIconRotationAlignment { get }
-
Creates a new value object containing the given
MGLIconTextFit
enumeration.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLIconTextFit:(MGLIconTextFit)iconTextFit;
Swift
convenience init(mglIconTextFit iconTextFit: MGLIconTextFit)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLIconTextFit
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLIconTextFit MGLIconTextFitValue;
Swift
var mglIconTextFitValue: MGLIconTextFit { get }
-
Creates a new value object containing the given
MGLSymbolPlacement
enumeration.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLSymbolPlacement: (MGLSymbolPlacement)symbolPlacement;
Swift
convenience init(mglSymbolPlacement symbolPlacement: MGLSymbolPlacement)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLSymbolPlacement
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLSymbolPlacement MGLSymbolPlacementValue;
Swift
var mglSymbolPlacementValue: MGLSymbolPlacement { get }
-
Creates a new value object containing the given
MGLTextAnchor
enumeration.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLTextAnchor:(MGLTextAnchor)textAnchor;
Swift
convenience init(mglTextAnchor textAnchor: MGLTextAnchor)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLTextAnchor
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLTextAnchor MGLTextAnchorValue;
Swift
var mglTextAnchorValue: MGLTextAnchor { get }
-
Creates a new value object containing the given
MGLTextJustification
enumeration.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLTextJustification: (MGLTextJustification)textJustification;
Swift
convenience init(mglTextJustification textJustification: MGLTextJustification)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLTextJustification
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLTextJustification MGLTextJustificationValue;
Swift
var mglTextJustificationValue: MGLTextJustification { get }
-
Creates a new value object containing the given
MGLTextPitchAlignment
enumeration.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLTextPitchAlignment: (MGLTextPitchAlignment)textPitchAlignment;
Swift
convenience init(mglTextPitchAlignment textPitchAlignment: MGLTextPitchAlignment)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLTextPitchAlignment
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLTextPitchAlignment MGLTextPitchAlignmentValue;
Swift
var mglTextPitchAlignmentValue: MGLTextPitchAlignment { get }
-
Creates a new value object containing the given
MGLTextRotationAlignment
enumeration.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLTextRotationAlignment: (MGLTextRotationAlignment)textRotationAlignment;
Swift
convenience init(mglTextRotationAlignment textRotationAlignment: MGLTextRotationAlignment)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLTextRotationAlignment
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLTextRotationAlignment MGLTextRotationAlignmentValue;
Swift
var mglTextRotationAlignmentValue: MGLTextRotationAlignment { get }
-
Creates a new value object containing the given
MGLTextTransform
enumeration.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLTextTransform: (MGLTextTransform)textTransform;
Swift
convenience init(mglTextTransform textTransform: MGLTextTransform)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLTextTransform
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLTextTransform MGLTextTransformValue;
Swift
var mglTextTransformValue: MGLTextTransform { get }
-
Creates a new value object containing the given
MGLFillTranslateAnchor
structure.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLFillTranslateAnchor: (MGLFillTranslateAnchor)fillTranslateAnchor;
Swift
convenience init(mglFillTranslateAnchor fillTranslateAnchor: MGLFillTranslateAnchor)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLFillTranslateAnchor
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLFillTranslateAnchor MGLFillTranslateAnchorValue;
Swift
var mglFillTranslateAnchorValue: MGLFillTranslateAnchor { get }
-
Creates a new value object containing the given
MGLLineTranslateAnchor
structure.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLLineTranslateAnchor: (MGLLineTranslateAnchor)lineTranslateAnchor;
Swift
convenience init(mglLineTranslateAnchor lineTranslateAnchor: MGLLineTranslateAnchor)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLLineTranslateAnchor
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLLineTranslateAnchor MGLLineTranslateAnchorValue;
Swift
var mglLineTranslateAnchorValue: MGLLineTranslateAnchor { get }
-
Creates a new value object containing the given
MGLIconTranslateAnchor
structure.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLIconTranslateAnchor: (MGLIconTranslateAnchor)iconTranslateAnchor;
Swift
convenience init(mglIconTranslateAnchor iconTranslateAnchor: MGLIconTranslateAnchor)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLIconTranslateAnchor
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLIconTranslateAnchor MGLIconTranslateAnchorValue;
Swift
var mglIconTranslateAnchorValue: MGLIconTranslateAnchor { get }
-
Creates a new value object containing the given
MGLTextTranslateAnchor
structure.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLTextTranslateAnchor: (MGLTextTranslateAnchor)textTranslateAnchor;
Swift
convenience init(mglTextTranslateAnchor textTranslateAnchor: MGLTextTranslateAnchor)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLTextTranslateAnchor
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLTextTranslateAnchor MGLTextTranslateAnchorValue;
Swift
var mglTextTranslateAnchorValue: MGLTextTranslateAnchor { get }
-
Creates a new value object containing the given
MGLCirclePitchScale
structure.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLCirclePitchScale: (MGLCirclePitchScale)circlePitchScale;
Swift
convenience init(mglCirclePitchScale circlePitchScale: MGLCirclePitchScale)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLCirclePitchScale
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLCirclePitchScale MGLCirclePitchScaleValue;
Swift
var mglCirclePitchScaleValue: MGLCirclePitchScale { get }
-
Creates a new value object containing the given
MGLCircleTranslateAnchor
structure.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLCircleTranslateAnchor: (MGLCircleTranslateAnchor)circleTranslateAnchor;
Swift
convenience init(mglCircleTranslateAnchor circleTranslateAnchor: MGLCircleTranslateAnchor)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLCircleTranslateAnchor
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLCircleTranslateAnchor MGLCircleTranslateAnchorValue;
Swift
var mglCircleTranslateAnchorValue: MGLCircleTranslateAnchor { get }