From a383edaae8ec05a3b385b19576c7a9358672662b Mon Sep 17 00:00:00 2001 From: Jesse Bounds Date: Mon, 6 Feb 2017 15:07:13 -0800 Subject: [ios, macos] Add function and interpolation mode to style property docs --- platform/darwin/scripts/generate-style-code.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'platform/darwin/scripts') diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js index 72aacbc742..efa7fe2d3c 100644 --- a/platform/darwin/scripts/generate-style-code.js +++ b/platform/darwin/scripts/generate-style-code.js @@ -281,6 +281,19 @@ global.propertyDoc = function (propertyName, property, layerType, kind) { doc += `\n\nThis attribute corresponds to the ${property.original} layout property in the Mapbox Style Specification.`; } } + doc += '`\n\nThis property can be set to one of the following values:\n\n' + + '- `MGLStyleConstantValue`\n'; + if (property["property-function"]) { + doc += '- `MGLCameraStyleFunction` with an interpolation mode of `MGLInterpolationModeExponential` or `MGLInterpolationModeInterval`\n' + + '- `MGLSourceStyleFunction` with an interpolation mode of `MGLInterpolationModeExponential`, `MGLInterpolationModeInterval`, `MGLInterpolationModeCategorical`, or `MGLInterpolationModeIdentity`\n' + + '- `MGLCompositeStyleFunction` with an interpolation mode of `MGLInterpolationModeExponential`, `MGLInterpolationModeInterval` or `MGLInterpolationModeCategorical`\n'; + } else { + if (property.function === "interpolated") { + doc += '- `MGLCameraStyleFunction` with an interpolation mode of `MGLInterpolationModeExponential` or `MGLInterpolationModeInterval`\n'; + } else { + doc += '- `MGLCameraStyleFunction` with an interpolation mode of `MGLInterpolationModeInterval`\n'; + } + } return doc; }; -- cgit v1.2.1