MGLCameraStyleFunction
@interface MGLCameraStyleFunction <T> : MGLStyleFunction<T>
An MGLCameraStyleFunction is a value function defining a style value that changes
as the zoom level changes. The layout and paint attribute properties of an
MGLStyleLayer object can be set to MGLCameraStyleFunction objects. Use a camera
function to create the illusion of depth and control data density.
The MGLCameraStyleFunction class takes a generic parameter T that indicates the
Foundation class being wrapped by this class.
-
Creates and returns an
MGLCameraStyleFunctionobject representing a camera function with one or more stops.Declaration
Objective-C
+ (nonnull instancetype) functionWithInterpolationMode:(MGLInterpolationMode)interpolationMode stops:(nonnull NSDictionary<id, MGLStyleValue<T> *> *) stops options: (nullable NSDictionary<MGLStyleFunctionOption, id> *) options;Swift
convenience init(interpolationMode: MGLInterpolationMode, stops: [AnyHashable : MGLStyleValueParameters
interpolationModeThe mode used to interpolate property values between map zoom level changes.
stopsA dictionary associating zoom levels with style values.
optionsA dictionary containing
MGLStyleFunctionOptionvalues that specify how a function is applied.Return Value
An
MGLCameraStyleFunctionobject with the given interpolation mode, camera stops, and options.
-
A dictionary associating zoom levels with style values.
Each of the function’s stops is represented by one key-value pair in the dictionary. Each key in the dictionary is an
NSNumberobject containing a floating-point zoom level. Each value in the dictionary is anMGLStyleValueobject containing the value of the style attribute when the map is at the associated zoom level. AnMGLStyleFunctionobject may not be used recursively as a stop value.Declaration
Objective-C
@property (readwrite, copy, nonatomic) NSDictionary<id, MGLStyleValue<T> *> *_Nonnull stops;Swift
var stops: [AnyHashable : MGLStyleValue
Install in Dash
MGLCameraStyleFunction Class Reference