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 lineCap;
Swift
var lineCap: 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 lineJoin;
Swift
var lineJoin: MGLLineJoin { 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 symbolPlacement;
Swift
var symbolPlacement: MGLSymbolPlacement { 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 iconRotationAlignment;
Swift
var iconRotationAlignment: 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 iconTextFit;
Swift
var iconTextFit: MGLIconTextFit { 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 textPitchAlignment;
Swift
var textPitchAlignment: 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 textRotationAlignment;
Swift
var textRotationAlignment: MGLTextRotationAlignment { get }
-
Creates a new value object containing the given
MGLTextJustify
enumeration.Declaration
Objective-C
+ (nonnull instancetype)valueWithMGLTextJustify:(MGLTextJustify)textJustify;
Swift
convenience init(mglTextJustify textJustify: MGLTextJustify)
Parameters
type
The value for the new object.
Return Value
A new value object that contains the style enumeration type.
-
The
MGLTextJustify
enumeration representation of the value.Declaration
Objective-C
@property (readonly, atomic) MGLTextJustify textJustify;
Swift
var textJustify: MGLTextJustify { 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 textAnchor;
Swift
var textAnchor: MGLTextAnchor { 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 textTransform;
Swift
var textTransform: 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 fillTranslateAnchor;
Swift
var fillTranslateAnchor: 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 lineTranslateAnchor;
Swift
var lineTranslateAnchor: 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 iconTranslateAnchor;
Swift
var iconTranslateAnchor: 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 textTranslateAnchor;
Swift
var textTranslateAnchor: MGLTextTranslateAnchor { 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 circleTranslateAnchor;
Swift
var circleTranslateAnchor: MGLCircleTranslateAnchor { 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 circlePitchScale;
Swift
var circlePitchScale: MGLCirclePitchScale { get }