MGLConstantStyleValue
@interface MGLConstantStyleValue <T> : MGLStyleValue<T>
An MGLConstantStyleValue
object is a generic container for a style attribute
value that remains constant as the zoom level changes. The layout and paint
attribute properties of MGLStyleLayer
objects can be set to
MGLConstantStyleValue
objects.
The MGLConstantStyleValue
class takes a generic parameter T
that indicates
the Foundation class being wrapped by this class.
-
Creates and returns an
MGLConstantStyleValue
object containing a raw value.Declaration
Objective-C
+ (nonnull instancetype)valueWithRawValue:(nonnull T)rawValue;
Parameters
rawValue
The constant value contained by the object.
Return Value
An
MGLConstantStyleValue
object containingrawValue
, which is treated as a constant value.
-
Returns an
MGLConstantStyleValue
object containing a raw value.Declaration
Objective-C
- (nonnull instancetype)initWithRawValue:(nonnull T)rawValue;
Swift
init(rawValue: T)
Parameters
rawValue
The value contained by the receiver.
Return Value
An
MGLConstantStyleValue
object containingrawValue
.
-
The raw value contained by the receiver.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) T _Nonnull rawValue;
Swift
var rawValue: T { get set }