+
+
+The example below increases a layer’s `circleRadius` exponentially based on a map’s zoom level. The interpolation base is `1.5`.
+
+Style function syntax:
+
+```swift
+let stops = [
+ 12: MGLStyleValuepredicate1 || predicate2
+`NSNotPredicateType` | `NOT predicate`| Attribute | Type | Meaning |
|---|---|---|
cluster |
+ Bool | +True if the feature is a point cluster. If the attribute is false (or not present) then the feature should not be considered a cluster. | +
cluster_id |
+ Number | +Identifier for the point cluster. | +
point_count |
+ Number | +The number of point features in a given cluster. | +
| Variable | Type | Meaning |
|---|---|---|
$featureIdentifier |
+ + Any + GeoJSON data type + | +
+ A value that uniquely identifies the feature in the containing source.
+ This variable corresponds to the
+ NSExpression.featureIdentifierVariableExpression property.
+ |
+
$geometryType |
+ String | +
+ The type of geometry represented by the feature. A feature’s type is one
+ of the following strings:
+
NSExpression.geometryTypeVariableExpression property.
+ |
+
$heatmapDensity |
+ Number | +
+ The
+ kernel density estimation
+ of a screen point in a heatmap layer; in other words, a relative measure
+ of how many data points are crowded around a particular pixel. This
+ variable can only be used with the heatmapColor property.
+ This variable corresponds to the
+ NSExpression.heatmapDensityVariableExpression property.
+ |
+
$zoomLevel |
+ Number | +
+ The current zoom level. In style layout and paint properties, this
+ variable may only appear as the target of a top-level interpolation or
+ step expression. This variable corresponds to the
+ NSExpression.zoomLevelVariableExpression property.
+ |
+
$lineProgress |
+ Number | +
+ A number that indicates the relative distance along a line at a given
+ point along the line. This variable evaluates to 0 at the beginning of the
+ line and 1 at the end of the line. It can only be used with the
+ `MGLLineStyleLayer.lineGradient` property. It corresponds to the
+ NSExpression.lineProgressVariableExpression property.
+ |
+
mgl_does:have:mgl_does:have:(SELF, '🧀�') or mgl_does:have:(%@, '🧀�')mgl_interpolate:withCurveType:parameters:stops:mgl_interpolate:withCurveType:parameters:stops:(x, 'linear', nil, %@)mgl_step:from:stops:mgl_step:from:stops:(x, 11, %@)mgl_join:mgl_join({'Old', 'MacDonald'})mgl_acos:mgl_acos(1)mgl_asin:mgl_asin(0)mgl_atan:mgl_atan(20)mgl_cos:mgl_cos(0)mgl_log2:mgl_log2(1024)mgl_round:mgl_round(1.5)mgl_sin:mgl_sin(0)mgl_tan:mgl_tan(0)mgl_distanceFrom:mgl_distanceFrom(%@) with an MGLShapemgl_coalesce:mgl_coalesce({x, y, z})mgl_attributed:mgl_attributed({x, y, z})MGL_LET:MGL_LET('age', uppercase('old'), 'name', uppercase('MacDonald'), mgl_join({$age, $name}))NSExpression values, followed by an NSExpression
+ that may contain references to those variables.
+MGL_MATCH:MGL_MATCH(x, 0, 'zero match', 1, 'one match', 2, 'two match', 'default')MGL_IF:MGL_IF(1 = 2, YES, 2 = 2, YES, NO)NSPredicate conditionals and resulting expressions,
+ followed by a default expression.
+MGL_FUNCTION:MGL_FUNCTION('typeof', mystery)boolValueFUNCTION(1, 'boolValue')NSExpression that evaluates to a number or string.
+FALSE when then input is an
+empty string, 0, FALSE, NIL, or NaN,
+otherwise TRUE.
+
+### `mgl_has:`
+
+mgl_has:FUNCTION($featureAttributes, 'mgl_has:', '🧀�')NSExpression that evaluates to an NSDictionary
+ or the evaluated object (SELF).
+NSExpression that evaluates to an NSString
+ representing the key to look up in the dictionary or the feature attribute to
+ look up in the evaluated object (see MGLFeature.attributes).
+true if the dictionary has a value for the key or if the evaluated
+object has a value for the feature attribute.
+
+This function corresponds to the
+[`has`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-has)
+operator in the Mapbox Style Specification. See also the
+[`mgl_does:have:`](#code-mgl_does-have-code) function, which is used on its own
+without the `FUNCTION()` operator. You can also check whether an object has an
+attribute by comparing the key path to `NIL`, for example `cheeseburger != NIL`
+or `burger.cheese != NIL`
+
+### `mgl_expressionWithContext:`
+
+mgl_expressionWithContext:FUNCTION($ios + $macos, 'mgl_expressionWithContext:', %@) with
+ a dictionary containing ios and macos keys
+NSExpression that may contain references to the variables
+ defined in the context dictionary.
+NSDictionary with NSStrings as keys and
+ NSExpressions as values. Each key is a variable name and each
+ value is the variable’s value within the target expression.
+mgl_interpolateWithCurveType:parameters:stops:FUNCTION($zoomLevel, 'mgl_interpolateWithCurveType:parameters:stops:', 'linear', NIL, %@)
+ with a dictionary containing zoom levels or other constant values as keys
+NSExpression that evaluates to a number and contains a
+ variable or key path expression.
+linear, exponential, or cubic-bezier.
+
+ The second argument is an expression providing parameters for the curve:
+
+ linear, the argument is NIL.exponential, the argument is an
+ expression that evaluates to a number, specifying the base of the
+ exponential interpolation.
+ cubic-bezier, the argument is an
+ array or aggregate expression containing four expressions, each
+ evaluating to a number. The four numbers are control points for the
+ cubic Bézier curve.
+ NSDictionary object representing the
+ interpolation’s stops, with numeric zoom levels as keys and expressions as
+ values.
+mgl_numberWithFallbackValues:,
+ doubleValue,
+ floatValue, or
+ decimalValue
+FUNCTION(ele, 'mgl_numberWithFallbackValues:', 0)NSExpression that evaluates to a Boolean value, number, or
+ string.
+NSExpressions, each evaluating to a Boolean value
+ or string.
+NIL or FALSE, the result is 0.
+* If the target is true, the result is 1.
+ * If the target is a string, it is converted to a number as specified by the
+ “[ToNumber Applied to the String Type](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type)�
+ algorithm of the ECMAScript Language Specification.
+ * If multiple values are provided, each one is evaluated in order until the
+ first successful conversion is obtained.
+
+This function corresponds to the
+[`to-number`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-types-to-number)
+operator in the Mapbox Style Specification. You can also cast a value to a
+number by passing the value and the string `NSNumber` into the `CAST()`
+operator.
+
+### `mgl_stepWithMinimum:stops:`
+
+mgl_stepWithMinimum:stops:FUNCTION($zoomLevel, 'mgl_stepWithMinimum:stops:', 0, %@) with
+ a dictionary with zoom levels or other constant values as keys
+NSExpression that evaluates to a number and contains a
+ variable or key path expression.
+NSDictionary object representing the
+ interpolation’s stops, with numeric zoom levels as keys and expressions as
+ values.
+stringByAppendingString:FUNCTION('Old', 'stringByAppendingString:', 'MacDonald')NSExpression that evaluates to a string.NSExpressions, each evaluating to a string.stringValueFUNCTION(ele, 'stringValue')NSExpression that evaluates to a Boolean value, number, or
+ string.
+NIL, the result is the empty string.
+* If the target is a Boolean value, the result is the string `true` or `false`.
+* If the target is a number, it is converted to a string as specified by the
+ “[NumberToString](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type)�
+ algorithm of the ECMAScript Language Specification.
+* If the target is a color, it is converted to a string of the form
+ `rgba(r,g,b,a)`, where r, g, and b are
+ numerals ranging from 0 to 255 and a ranges from 0 to 1.
+* Otherwise, the target is converted to a string in the format specified by the
+ [`JSON.stringify()`](https://tc39.github.io/ecma262/#sec-json.stringify)
+ function of the ECMAScript Language Specification.
+
+This function corresponds to the
+[`to-string`](https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-types-to-string)
+operator in the Mapbox Style Specification. You can also cast a value to a
+string by passing the value and the string `NSString` into the `CAST()`
+operator.
diff --git a/mapbox-gl-native-ios/platform/darwin/docs/guides/Tile URL Templates.md.ejs b/mapbox-gl-native-ios/platform/darwin/docs/guides/Tile URL Templates.md.ejs
new file mode 100644
index 000000000..2b1de65b4
--- /dev/null
+++ b/mapbox-gl-native-ios/platform/darwin/docs/guides/Tile URL Templates.md.ejs
@@ -0,0 +1,109 @@
+<%
+ const os = locals.os;
+ const iOS = os === 'iOS';
+ //const macOS = os === 'macOS';
+ //const cocoaPrefix = iOS ? 'UI' : 'NS';
+-%>
+
+# Tile URL Templates
+
+`MGLTileSource` objects, specifically `MGLRasterTileSource` and
+`MGLVectorTileSource` objects, can be created using an initializer that accepts
+an array of tile URL templates. Tile URL templates are strings that specify the
+URLs of the vector tiles or raster tile images to load. A template resembles an
+absolute URL, but with any number of placeholder strings that the source
+evaluates based on the tile it needs to load. For example:
+
+* `http://www.example.com/tiles/{z}/{x}/{y}.pbf` could be
+ evaluated as `http://www.example.com/tiles/14/6/9.pbf`.
+* `http://www.example.com/tiles/{z}/{x}/{y}{ratio}.png` could be
+ evaluated as `http://www.example.com/tiles/14/6/9@2x.png`.
+
+Tile URL templates are also used to define tilesets in TileJSON manifests or
+[`raster`](https://www.mapbox.com/mapbox-gl-js/style-spec/#sources-raster-tiles)
+and
+[`vector`](https://www.mapbox.com/mapbox-gl-js/style-spec/#sources-vector-tiles)
+sources in style JSON files. See the
+[TileJSON specification](https://github.com/mapbox/tilejson-spec/tree/master/2.2.0)
+for information about tile URL templates in the context of a TileJSON or style
+JSON file.
+
+Tile sources support the following placeholder strings in tile URL templates,
+all of which are optional:
+
+| Placeholder string | Description |
|---|---|
{x} |
+ The index of the tile along the map’s x axis according to Spherical + Mercator projection. If the value is 0, the tile’s left edge corresponds + to the 180th meridian west. If the value is 2z−1, + the tile’s right edge corresponds to the 180th meridian east. | +
{y} |
+ The index of the tile along the map’s y axis according to Spherical
+ Mercator projection. If the value is 0, the tile’s tile edge corresponds
+ to arctan(sinh(Ï€)), or approximately 85.0511 degrees north. If the value
+ is 2z−1, the tile’s bottom edge corresponds to
+ −arctan(sinh(π)), or approximately 85.0511 degrees south. The y axis is
+ inverted if the options parameter contains
+ MGLTileSourceOptionTileCoordinateSystem with a value of
+ MGLTileCoordinateSystemTMS. |
+
{z} |
+ The tile’s zoom level. At zoom level 0, each tile covers the entire
+ world map; at zoom level 1, it covers ¼ of the world; at zoom level 2,
+ 1�16 of the world, and so on. For tiles loaded by
+ a MGLRasterTileSource object, whether the tile zoom level
+ matches the map’s current zoom level depends on the value of the
+ source’s tile size as specified in the
+ MGLTileSourceOptionTileSize key of the options
+ parameter. |
+
{bbox-epsg-3857} |
+ The tile’s bounding box, expressed as a comma-separated list of the + tile’s western, southern, eastern, and northern extents according to + Spherical Mercator (EPSG:3857) projection. The bounding box is typically + used with map services conforming to the + Web Map Service + protocol. | +
{quadkey} |
+ A quadkey indicating both the tile’s location and its zoom level. The + quadkey is typically used with + Bing Maps. + | +
{ratio} |
+ A suffix indicating the resolution of the tile image. The suffix is the
+ empty string for standard resolution displays and @2x for
+<% if (iOS) { -%>
+ Retina displays, including displays for which UIScreen.scale
+ is 3.
+<% } else { -%>
+ Retina displays.
+<% } -%>
+ |
+
{prefix} |
+ Two hexadecimal digits chosen such that each visible tile has a + different prefix. The prefix is typically used for domain sharding. | +
${property.original} layout property in the Mapbox Style Specification.`;
+ }
+ doc += '\n\nYou can set this property to an expression containing any of the following:\n\n';
+ doc += `* Constant ${describeType(property)} values`;
+ if ('minimum' in property) {
+ if ('maximum' in property) {
+ doc += ` between ${formatNumber(property.minimum)} and ${formatNumber(property.maximum)} inclusive`;
+ } else {
+ doc += ` no less than ${formatNumber(property.minimum)}`;
+ }
+ } else if ('maximum' in property) {
+ doc += ` no greater than ${formatNumber(property.maximum)}`;
+ }
+ doc += '\n';
+ if (property.type === 'enum') {
+ doc += '* Any of the following constant string values:\n';
+ doc += Object.keys(property.values).map(value => ' * `' + value + '`: ' + property.values[value].doc).join('\n') + '\n';
+ } else if (property.type === 'array' && property.value === 'enum') {
+ doc += '* Constant array, in which each element is any of the following constant string values:\n';
+ doc += Object.keys(property.values).map(value => ' * `' + value + '`: ' + property.values[value].doc).join('\n') + '\n';
+ }
+ if (property.type === 'formatted') {
+ doc += '* Formatted expressions.\n';
+ }
+ doc += '* Predefined functions, including mathematical and string operators\n' +
+ '* Conditional expressions\n' +
+ '* Variable assignments and references to assigned variables\n';
+ const inputVariable = property.expression && property['property-type'] === 'color-ramp' ?
+ '$' + camelizeWithLeadingLowercase(property.expression.parameters[0]) : '$zoomLevel';
+ if (isDataDriven(property)) {
+ doc += `* Interpolation and step functions applied to the \`${inputVariable}\` variable and/or feature attributes\n`;
+ } else if (property.expression && property.expression.interpolated) {
+ doc += `* Interpolation and step functions applied to the \`${inputVariable}\` variable\n\n` +
+ 'This property does not support applying interpolation or step functions to feature attributes.';
+ } else {
+ doc += `* Step functions applied to the \`${inputVariable}\` variable\n\n` +
+ `This property does not support applying interpolation functions to the \`${inputVariable}\` variable or applying interpolation or step functions to feature attributes.`;
+ }
+ }
+ return doc;
+};
+
+global.propertyExample = function (property) {
+ return property.examples;
+};
+
+global.isDataDriven = function (property) {
+ return property['property-type'] === 'data-driven' || property['property-type'] === 'cross-faded-data-driven';
+};
+
+global.propertyReqs = function (property, propertiesByName, type) {
+ return 'This property is only applied to the style if ' + property.requires.map(function (req) {
+ if (typeof req === 'string') {
+ return '`' + camelizeWithLeadingLowercase(req) + '` is non-`nil`';
+ } else if ('!' in req) {
+ return '`' + camelizeWithLeadingLowercase(req['!']) + '` is set to `nil`';
+ } else {
+ let name = Object.keys(req)[0];
+ if (name === 'source')
+ return 'the data source requirements are met';
+ return '`' + camelizeWithLeadingLowercase(name) + '` is set to an expression that evaluates to ' + describeValue(req[name], propertiesByName[name], type);
+ }
+ }).join(', and ') + '. Otherwise, it is ignored.';
+};
+
+global.parseColor = function (str) {
+ let color = colorParser.parseCSSColor(str);
+ return {
+ r: color[0] / 255,
+ g: color[1] / 255,
+ b: color[2] / 255,
+ a: color[3],
+ };
+};
+
+global.describeType = function (property) {
+ switch (property.type) {
+ case 'boolean':
+ return 'Boolean';
+ case 'number':
+ return 'numeric';
+ case 'formatted':
+ case 'string':
+ case 'resolvedImage':
+ return 'string';
+ case 'enum':
+ return '`MGL' + camelize(property.name) + '`';
+ case 'color':
+ return '`UIColor`';
+ case 'array':
+ switch (arrayType(property)) {
+ case 'padding':
+ return '`UIEdgeInsets`';
+ case 'offset':
+ case 'translate':
+ return '`CGVector`';
+ case 'position':
+ return '`MGLSphericalPosition`';
+ case 'anchor':
+ return '`MGLTextAnchor` array';
+ case 'mode':
+ return '`MGLTextWritingMode` array';
+ default:
+ return 'array';
+ }
+ break;
+ default:
+ throw new Error(`unknown type for ${property.name}`);
+ }
+}
+
+global.describeValue = function (value, property, layerType) {
+ if (Array.isArray(value) && property.type !== 'array' && property.type !== 'enum') {
+ switch (value[0]) {
+ case 'interpolate': {
+ let curveType = value[1][0];
+ let minimum = describeValue(value[3 + value.length % 2], property, layerType);
+ let maximum = describeValue(_.last(value), property, layerType);
+ return `${curveType.match(/^[aeiou]/i) ? 'an' : 'a'} ${curveType} interpolation expression ranging from ${minimum} to ${maximum}`;
+ }
+ default:
+ throw new Error(`No description available for ${value[0]} expression in ${property.name} of ${layerType}.`);
+ }
+ }
+
+ switch (property.type) {
+ case 'boolean':
+ return value ? '`YES`' : '`NO`';
+ case 'number':
+ return 'the float ' + '`' + formatNumber(value) + '`';
+ case 'formatted':
+ case 'string':
+ case 'resolvedImage':
+ if (value === '') {
+ return 'the empty string';
+ }
+ return 'the string `' + value + '`';
+ case 'enum':
+ let displayValue;
+ if (Array.isArray(value)) {
+ let separator = (value.length === 2) ? ' ' : ', ';
+ displayValue = value.map((possibleValue, i) => {
+ let conjunction = '';
+ if (value.length === 2 && i === 0) conjunction = 'either ';
+ if (i === value.length - 1) conjunction = 'or ';
+ let objCType = global.objCType(layerType, property.name);
+ return `${conjunction}\`${objCType}${camelize(possibleValue)}\``;
+ }).join(separator);
+ } else {
+ displayValue = `\`${value}\``;
+ }
+ return displayValue;
+ case 'color':
+ let color = parseColor(value);
+ if (!color) {
+ throw new Error(`unrecognized color format in default value of ${property.name}`);
+ }
+ if (color.r === 0 && color.g === 0 && color.b === 0 && color.a === 0) {
+ return '`UIColor.clearColor`';
+ }
+ if (color.r === 0 && color.g === 0 && color.b === 0 && color.a === 1) {
+ return '`UIColor.blackColor`';
+ }
+ if (color.r === 1 && color.g === 1 && color.b === 1 && color.a === 1) {
+ return '`UIColor.whiteColor`';
+ }
+ return 'a `UIColor`' + ` object whose RGB value is ${formatNumber(color.r)}, ${formatNumber(color.g)}, ${formatNumber(color.b)} and whose alpha value is ${formatNumber(color.a)}`;
+ case 'array':
+ let units = property.units || '';
+ if (units) {
+ units = ` ${units}`.replace(/pixel/, 'point');
+ }
+ switch (arrayType(property)) {
+ case 'padding':
+ if (value[0] === 0 && value[1] === 0 && value[2] === 0 && value[3] === 0) {
+ return 'an `NSValue` object containing `UIEdgeInsetsZero`';
+ }
+ return 'an `NSValue` object containing a `UIEdgeInsets` struct set to' + ` ${formatNumber(value[0])}${units} on the top, ${formatNumber(value[3])}${units} on the left, ${formatNumber(value[2])}${units} on the bottom, and ${formatNumber(value[1])}${units} on the right`;
+ case 'offset':
+ case 'translate':
+ return 'an `NSValue` object containing a `CGVector` struct set to' + ` ${formatNumber(value[0])}${units} rightward and ${formatNumber(value[1])}${units} downward`;
+ case 'position':
+ return 'an `MGLSphericalPosition` struct set to' + ` ${formatNumber(value[0])} radial, ${formatNumber(value[1])} azimuthal and ${formatNumber(value[2])} polar`;
+ default:
+ return 'the array `' + value.join('`, `') + '`';
+ }
+ default:
+ throw new Error(`unknown type for ${property.name}`);
+ }
+};
+
+global.formatNumber = function (num) {
+ return num.toLocaleString().replace('-', '\u2212');
+}
+
+global.propertyDefault = function (property, layerType) {
+ if (property.name === 'heatmap-color') {
+ return 'an expression that evaluates to a rainbow color scale from blue to red';
+ } else {
+ return 'an expression that evaluates to ' + describeValue(property.default, property, layerType);
+ }
+};
+
+global.originalPropertyName = function (property) {
+ return property.original || property.name;
+};
+
+global.enumName = function (property) {
+ return property.enumName || property.name;
+};
+
+global.propertyType = function (property) {
+ switch (property.type) {
+ case 'boolean':
+ return 'NSNumber *';
+ case 'number':
+ return 'NSNumber *';
+ case 'formatted':
+ case 'string':
+ case 'resolvedImage':
+ return 'NSString *';
+ case 'enum':
+ return 'NSValue *';
+ case 'color':
+ return 'MGLColor *';
+ case 'array':
+ switch (arrayType(property)) {
+ case 'dasharray':
+ return 'NSArraycircle-pitch-scale
+ layout property in the Mapbox Style Specification.
+
+ You can set this property to an expression containing any of the following:
+
+ * Constant `MGLCircleScaleAlignment` values
+ * Any of the following constant string values:
+ * `map`: Circles are scaled according to their apparent distance to the
+ camera.
+ * `viewport`: Circles are not scaled.
+ * Predefined functions, including mathematical and string operators
+ * Conditional expressions
+ * Variable assignments and references to assigned variables
+ * Step functions applied to the `$zoomLevel` variable
+
+ This property does not support applying interpolation functions to the
+ `$zoomLevel` variable or applying interpolation or step functions to feature
+ attributes.
+ */
+@property (nonatomic, null_resettable) NSExpression *circleScaleAlignment;
+
+@property (nonatomic, null_resettable) NSExpression *circlePitchScale __attribute__((unavailable("Use circleScaleAlignment instead.")));
+
+#if TARGET_OS_IPHONE
+/**
+ The stroke color of the circle.
+
+ The default value of this property is an expression that evaluates to
+ `UIColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ You can set this property to an expression containing any of the following:
+
+ * Constant `UIColor` values
+ * Predefined functions, including mathematical and string operators
+ * Conditional expressions
+ * Variable assignments and references to assigned variables
+ * Interpolation and step functions applied to the `$zoomLevel` variable and/or
+ feature attributes
+ */
+@property (nonatomic, null_resettable) NSExpression *circleStrokeColor;
+#else
+/**
+ The stroke color of the circle.
+
+ The default value of this property is an expression that evaluates to
+ `NSColor.blackColor`. Set this property to `nil` to reset it to the default
+ value.
+
+ You can set this property to an expression containing any of the following:
+
+ * Constant `NSColor` values
+ * Predefined functions, including mathematical and string operators
+ * Conditional expressions
+ * Variable assignments and references to assigned variables
+ * Interpolation and step functions applied to the `$zoomLevel` variable and/or
+ feature attributes
+ */
+@property (nonatomic, null_resettable) NSExpression *circleStrokeColor;
+#endif
+
+/**
+ The transition affecting any changes to this layer’s `circleStrokeColor` property.
+
+ This property corresponds to the `circle-stroke-color-transition` property in the style JSON file format.
+*/
+@property (nonatomic) MGLTransition circleStrokeColorTransition;
+
+/**
+ The opacity of the circle's stroke.
+
+ The default value of this property is an expression that evaluates to the float
+ `1`. Set this property to `nil` to reset it to the default value.
+
+ You can set this property to an expression containing any of the following:
+
+ * Constant numeric values between 0 and 1 inclusive
+ * Predefined functions, including mathematical and string operators
+ * Conditional expressions
+ * Variable assignments and references to assigned variables
+ * Interpolation and step functions applied to the `$zoomLevel` variable and/or
+ feature attributes
+ */
+@property (nonatomic, null_resettable) NSExpression *circleStrokeOpacity;
+
+/**
+ The transition affecting any changes to this layer’s `circleStrokeOpacity` property.
+
+ This property corresponds to the `circle-stroke-opacity-transition` property in the style JSON file format.
+*/
+@property (nonatomic) MGLTransition circleStrokeOpacityTransition;
+
+/**
+ The width of the circle's stroke. Strokes are placed outside of the
+ `circleRadius`.
+
+ This property is measured in points.
+
+ The default value of this property is an expression that evaluates to the float
+ `0`. Set this property to `nil` to reset it to the default value.
+
+ You can set this property to an expression containing any of the following:
+
+ * Constant numeric values no less than 0
+ * Predefined functions, including mathematical and string operators
+ * Conditional expressions
+ * Variable assignments and references to assigned variables
+ * Interpolation and step functions applied to the `$zoomLevel` variable and/or
+ feature attributes
+ */
+@property (nonatomic, null_resettable) NSExpression *circleStrokeWidth;
+
+/**
+ The transition affecting any changes to this layer’s `circleStrokeWidth` property.
+
+ This property corresponds to the `circle-stroke-width-transition` property in the style JSON file format.
+*/
+@property (nonatomic) MGLTransition circleStrokeWidthTransition;
+
+#if TARGET_OS_IPHONE
+/**
+ The geometry's offset.
+
+ This property is measured in points.
+
+ The default value of this property is an expression that evaluates to an
+ `NSValue` object containing a `CGVector` struct set to 0 points rightward and 0
+ points downward. Set this property to `nil` to reset it to the default value.
+
+ This attribute corresponds to the circle-translate
+ layout property in the Mapbox Style Specification.
+
+ You can set this property to an expression containing any of the following:
+
+ * Constant `CGVector` values
+ * Predefined functions, including mathematical and string operators
+ * Conditional expressions
+ * Variable assignments and references to assigned variables
+ * Interpolation and step functions applied to the `$zoomLevel` variable
+
+ This property does not support applying interpolation or step functions to
+ feature attributes.
+ */
+@property (nonatomic, null_resettable) NSExpression *circleTranslation;
+#else
+/**
+ The geometry's offset.
+
+ This property is measured in points.
+
+ The default value of this property is an expression that evaluates to an
+ `NSValue` object containing a `CGVector` struct set to 0 points rightward and 0
+ points upward. Set this property to `nil` to reset it to the default value.
+
+ This attribute corresponds to the circle-translate
+ layout property in the Mapbox Style Specification.
+
+ You can set this property to an expression containing any of the following:
+
+ * Constant `CGVector` values
+ * Predefined functions, including mathematical and string operators
+ * Conditional expressions
+ * Variable assignments and references to assigned variables
+ * Interpolation and step functions applied to the `$zoomLevel` variable
+
+ This property does not support applying interpolation or step functions to
+ feature attributes.
+ */
+@property (nonatomic, null_resettable) NSExpression *circleTranslation;
+#endif
+
+/**
+ The transition affecting any changes to this layer’s `circleTranslation` property.
+
+ This property corresponds to the `circle-translate-transition` property in the style JSON file format.
+*/
+@property (nonatomic) MGLTransition circleTranslationTransition;
+
+@property (nonatomic, null_resettable) NSExpression *circleTranslate __attribute__((unavailable("Use circleTranslation instead.")));
+
+/**
+ Controls the frame of reference for `circleTranslation`.
+
+ The default value of this property is an expression that evaluates to `map`.
+ Set this property to `nil` to reset it to the default value.
+
+ This property is only applied to the style if `circleTranslation` is non-`nil`.
+ Otherwise, it is ignored.
+
+ This attribute corresponds to the circle-translate-anchor
+ layout property in the Mapbox Style Specification.
+
+ You can set this property to an expression containing any of the following:
+
+ * Constant `MGLCircleTranslationAnchor` values
+ * Any of the following constant string values:
+ * `map`: The circle is translated relative to the map.
+ * `viewport`: The circle is translated relative to the viewport.
+ * Predefined functions, including mathematical and string operators
+ * Conditional expressions
+ * Variable assignments and references to assigned variables
+ * Step functions applied to the `$zoomLevel` variable
+
+ This property does not support applying interpolation functions to the
+ `$zoomLevel` variable or applying interpolation or step functions to feature
+ attributes.
+ */
+@property (nonatomic, null_resettable) NSExpression *circleTranslationAnchor;
+
+@property (nonatomic, null_resettable) NSExpression *circleTranslateAnchor __attribute__((unavailable("Use circleTranslationAnchor instead.")));
+
+@end
+
+/**
+ Methods for wrapping an enumeration value for a style layer attribute in an
+ `MGLCircleStyleLayer` object and unwrapping its raw value.
+ */
+@interface NSValue (MGLCircleStyleLayerAdditions)
+
+#pragma mark Working with Circle Style Layer Attribute Values
+
+/**
+ Creates a new value object containing the given `MGLCirclePitchAlignment` enumeration.
+
+ @param circlePitchAlignment The value for the new object.
+ @return A new value object that contains the enumeration value.
+ */
++ (instancetype)valueWithMGLCirclePitchAlignment:(MGLCirclePitchAlignment)circlePitchAlignment;
+
+/**
+ The `MGLCirclePitchAlignment` enumeration representation of the value.
+ */
+@property (readonly) MGLCirclePitchAlignment MGLCirclePitchAlignmentValue;
+
+/**
+ Creates a new value object containing the given `MGLCircleScaleAlignment` enumeration.
+
+ @param circleScaleAlignment The value for the new object.
+ @return A new value object that contains the enumeration value.
+ */
++ (instancetype)valueWithMGLCircleScaleAlignment:(MGLCircleScaleAlignment)circleScaleAlignment;
+
+/**
+ The `MGLCircleScaleAlignment` enumeration representation of the value.
+ */
+@property (readonly) MGLCircleScaleAlignment MGLCircleScaleAlignmentValue;
+
+/**
+ Creates a new value object containing the given `MGLCircleTranslationAnchor` enumeration.
+
+ @param circleTranslationAnchor The value for the new object.
+ @return A new value object that contains the enumeration value.
+ */
++ (instancetype)valueWithMGLCircleTranslationAnchor:(MGLCircleTranslationAnchor)circleTranslationAnchor;
+
+/**
+ The `MGLCircleTranslationAnchor` enumeration representation of the value.
+ */
+@property (readonly) MGLCircleTranslationAnchor MGLCircleTranslationAnchorValue;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/mapbox-gl-native-ios/platform/darwin/src/MGLCircleStyleLayer.mm b/mapbox-gl-native-ios/platform/darwin/src/MGLCircleStyleLayer.mm
new file mode 100644
index 000000000..bccd7e29f
--- /dev/null
+++ b/mapbox-gl-native-ios/platform/darwin/src/MGLCircleStyleLayer.mm
@@ -0,0 +1,497 @@
+// This file is generated.
+// Edit platform/darwin/scripts/generate-style-code.js, then run `make darwin-style-code`.
+
+#import "MGLSource.h"
+#import "NSPredicate+MGLPrivateAdditions.h"
+#import "NSDate+MGLAdditions.h"
+#import "MGLStyleLayer_Private.h"
+#import "MGLStyleValue_Private.h"
+#import "MGLCircleStyleLayer.h"
+#import "MGLLoggingConfiguration_Private.h"
+#import "MGLCircleStyleLayer_Private.h"
+
+#include | In the tile source | This property |
|---|---|
| Integer | NSNumber (use the unsignedLongLongValue or longLongValue property) |
| Floating-point number | NSNumber (use the doubleValue property) |
| String | NSString |
| In the tile source | In this dictionary |
|---|---|
| Null | NSNull |
| Boolean | NSNumber (use the boolValue property) |
| Integer | NSNumber (use the unsignedLongLongValue or longLongValue property) |
| Floating-point number | NSNumber (use the doubleValue property) |
| String | NSString |