diff options
author | Jesse Bounds <jesse@rebounds.net> | 2017-02-08 12:28:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 12:28:50 -0800 |
commit | c639105c9f7b92e4d8307b2b403275d537a76844 (patch) | |
tree | 0f095bb040cfe7bdae2b930d50ba4c230ea16077 | |
parent | 06a8ed79598beae923b795dea711834b4775f6b0 (diff) | |
download | qtlocation-mapboxgl-c639105c9f7b92e4d8307b2b403275d537a76844.tar.gz |
[ios, macos] Document DDS enumerations (#7931)
[ios, macos] Document DDS enumerations
-rw-r--r-- | platform/darwin/src/MGLStyleValue.h | 60 |
1 files changed, 56 insertions, 4 deletions
diff --git a/platform/darwin/src/MGLStyleValue.h b/platform/darwin/src/MGLStyleValue.h index 1ae8a67861..2ce2eae89a 100644 --- a/platform/darwin/src/MGLStyleValue.h +++ b/platform/darwin/src/MGLStyleValue.h @@ -6,20 +6,72 @@ NS_ASSUME_NONNULL_BEGIN -// TODO: API docs +/** + Options for `MGLStyleFunction` objects. + */ typedef NSString *MGLStyleFunctionOption NS_STRING_ENUM; -// TODO: API docs +/** + An `NSNumber` object containing an integer that determines the style function's + exponential interpolation base. + + The exponential interpolation base controls the rate at which the function’s + output values increase. A value of 1 causes the function to increase linearly + by zoom level. A higher exponential 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 value of this property is 1, for a + linear curve. + + This attribute corresponds to the + <a href="https://www.mapbox.com/mapbox-gl-js/style-spec/#function-base"><code>base</code></a> + function property in the Mapbox Style Specification. + + This option only applies to functions that use an + `MGLInterpolationModeExponential` interpolation mode that are assigned to + interpolatable style layer properties. + */ extern MGL_EXPORT const MGLStyleFunctionOption MGLStyleFunctionOptionInterpolationBase; -// TODO: API docs +/** + An `MGLStyleConstantValue` object that specifies a default value that a style + function can use when it can't otherwise determine a value. + + A default value can be used to set the value of a style layer property that + is not otherwise set by a function. For example, a source function with a + `MGLInterpolationModeCategorical` interpolation mode with stops that specify + color values to use based on a feature's attributes would set any feature + that does not have attributes that match the stop key values to this + default value. + + This option only applies to `MGLSourceStyleFunction` and + `MGLCompositeStyleFunction` functions. + */ extern MGL_EXPORT const MGLStyleFunctionOption MGLStyleFunctionOptionDefaultValue; -// TODO: API docs +/** + The modes used to interpolate property values between map zoom level changes + or over a range of feature attribute values. + */ typedef NS_ENUM(NSUInteger, MGLInterpolationMode) { + /** + Values between two stops are interpolated exponentially or linearly if the + `MGLStyleFunctionOptionInterpolationBase` is 1. + */ MGLInterpolationModeExponential = 0, + /** + Values between two stops are not interpolated. Instead, properties are set + to the value of the stop just less than the function input. + */ MGLInterpolationModeInterval, + /** + 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. + */ MGLInterpolationModeCategorical, + /** + Values between two stops are not interpolated. Instead, values are set + to their input value. + */ MGLInterpolationModeIdentity }; |