MGLInterpolationMode

enum MGLInterpolationMode : NSUInteger {}

The modes used to interpolate property values between map zoom level changes or over a range of feature attribute values.

  • Values between two stops are interpolated linearly, or exponentially based on the MGLStyleFunctionOptionInterpolationBase. A higher interpolation base causes the function’s output values to vary exponentially, increasing more rapidly towards the high end of the function’s range. The default interpolation base of 1 creates a linear interpolation. Use exponential interpolation mode to show values relative to stop keys.

    Declaration

    Objective-C

    MGLInterpolationModeExponential = 0

    Swift

    case exponential = 0
  • Values between two stops are not interpolated. Instead, properties are set to the value of the stop just less than the function input. Use interval interpolation mode to show values that fall within a range.

    Declaration

    Objective-C

    MGLInterpolationModeInterval

    Swift

    case interval = 1
  • Values between two stops are not interpolated. Instead, properties are set to the value of the stop equal to the function input’s key value. Use categorical interpolation mode to show values that fit into categories.

    Declaration

    Objective-C

    MGLInterpolationModeCategorical

    Swift

    case categorical = 2
  • Values between two stops are not interpolated. Instead, for any given feature, the style value matches a value in that feature’s attributes dictionary. Use identity interpolation mode to show attribute values that can be used as style values.

    Declaration

    Objective-C

    MGLInterpolationModeIdentity

    Swift

    case identity = 3