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.

  • 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 NSNumber object containing a floating-point zoom level. Each value in the dictionary is an MGLStyleValue object containing the value of the style attribute when the map is at the associated zoom level. An MGLStyleFunction object 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<T>] { get set }