summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-08-18 02:12:18 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-08-19 14:20:27 -0700
commite6ed9cd63876962efc7432f6ff34012fc0fe815b (patch)
tree11c354b30064aefba0b25395fdb8ca7ad9971c6b
parent99fc6dfce810b5894b9039c5aabb4fbfd5af0751 (diff)
downloadqtlocation-mapboxgl-e6ed9cd63876962efc7432f6ff34012fc0fe815b.tar.gz
[ios, macos] Fully describe default values
Also expand values in documentation comments to the full enumeration values. Fixes #5949.
-rw-r--r--platform/darwin/scripts/generate-style-code.js64
-rw-r--r--platform/darwin/src/MGLBackgroundStyleLayer.h2
-rw-r--r--platform/darwin/src/MGLCircleStyleLayer.h10
-rw-r--r--platform/darwin/src/MGLFillStyleLayer.h8
-rw-r--r--platform/darwin/src/MGLLineStyleLayer.h10
-rw-r--r--platform/darwin/src/MGLStyleLayer.h.ejs4
-rw-r--r--platform/darwin/src/MGLSymbolStyleLayer.h60
7 files changed, 108 insertions, 50 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js
index 77c1ee5a1d..c84332a7b3 100644
--- a/platform/darwin/scripts/generate-style-code.js
+++ b/platform/darwin/scripts/generate-style-code.js
@@ -37,7 +37,7 @@ global.testImplementation = function (property, layerType) {
return `layer.${objCName(property)} = MGLRuntimeStylingHelper.testColor;`;
case 'array':
return testArrayImplementation(property);
- default: throw new Error(`unknown type for ${property.name}`)
+ default: throw new Error(`unknown type for ${property.name}`);
}
}
@@ -57,7 +57,7 @@ global.testGetterImplementation = function (property, layerType) {
return `XCTAssertEqualObjects(gLayer.${objCName(property)}, MGLRuntimeStylingHelper.testColor);`;
case 'array':
return testGetterArrayImplementation(property);
- default: throw new Error(`unknown type for ${property.name}`)
+ default: throw new Error(`unknown type for ${property.name}`);
}
}
@@ -89,7 +89,11 @@ global.testArrayImplementation = function (property) {
global.propertyDoc = function (property, layerType) {
let doc = property.doc.replace(/`(.+?)`/g, function (m, symbol, offset, str) {
- if (!('values' in property && property.values.indexOf(symbol) !== -1) && str.substr(offset - 4, 3) !== 'CSS') {
+ if ('values' in property && property.values.indexOf(symbol) !== -1) {
+ let objCType = `${prefix}${camelize(layerType)}${suffix}${camelize(property.name)}`;
+ return '`' + `${objCType}${camelize(symbol)}` + '`';
+ }
+ if (str.substr(offset - 4, 3) !== 'CSS') {
symbol = camelizeWithLeadingLowercase(symbol);
}
return '`' + symbol + '`';
@@ -97,6 +101,60 @@ global.propertyDoc = function (property, layerType) {
return doc;
};
+global.parseColor = function (str) {
+ let m = str.match(/^#(\d\d)(\d\d)(\d\d)$/);
+ if (m) {
+ return {
+ r: parseInt(m[1], 16) / 255,
+ g: parseInt(m[2], 16) / 255,
+ b: parseInt(m[3], 16) / 255,
+ a: 1.0,
+ };
+ }
+
+ m = str.match(/^rgba\(\s*([-\d.]+),\s*([-\d.]+),\s*([-\d.]+),\s*([\d.]+)\s*\)$/);
+ if (m) {
+ return {
+ r: parseFloat(m[1]) / 255,
+ g: parseFloat(m[2]) / 255,
+ b: parseFloat(m[3]) / 255,
+ a: parseFloat(m[4]),
+ };
+ }
+};
+
+global.propertyDefault = function (property, layerType) {
+ switch (property.type) {
+ case 'boolean':
+ return property.default ? '`YES`' : '`NO`';
+ case 'number':
+ case 'string':
+ return '`' + property.default + '`';
+ case 'enum':
+ let objCType = `${prefix}${camelize(layerType)}${suffix}${camelize(property.name)}`;
+ return '`' + `${objCType}${camelize(property.default)}` + '`';
+ case 'color':
+ let color = parseColor(property.default);
+ if (!color) {
+ throw new Error(`unrecognized color format in default value of ${property.name}`);
+ }
+ return 'an `NSColor` or `UIColor`' + `object whose RGB value is ${color.r}, ${color.g}, ${color.b} and whose alpha value is ${color.a}`;
+ case 'array':
+ if (property.name.indexOf('padding') !== -1) {
+ //if (property.default.reduce((a, b) => a + b, 0) === 0) {
+ // return '`NSEdgeInsetsZero` or `UIEdgeInsetsZero`';
+ //}
+ return `${property.default[0]} on the top, ${property.default[1]} on the right, ${property.default[2]} on the bottom, and ${property.default[3]} on the left`;
+ }
+ if (property.name.indexOf('offset') !== -1 || property.name.indexOf('translate') !== -1) {
+ return `${property.default[0]} from the left and ${property.default[1]} from the top`;
+ }
+ return '`' + property.default.join('`, `') + '`';
+ default:
+ throw new Error(`unknown type for ${property.name}`);
+ }
+};
+
global.propertyType = function (property, _private) {
return _private ? `id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>` : `id <MGLStyleAttributeValue>`;
};
diff --git a/platform/darwin/src/MGLBackgroundStyleLayer.h b/platform/darwin/src/MGLBackgroundStyleLayer.h
index 3412cde971..ecf4f995e9 100644
--- a/platform/darwin/src/MGLBackgroundStyleLayer.h
+++ b/platform/darwin/src/MGLBackgroundStyleLayer.h
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
The color with which the background will be drawn.
- The default value of this property is `#000000`. Set this property to `nil` to reset it to the default.
+ The default value of this property is an `NSColor` or `UIColor`object whose RGB value is 0, 0, 0 and whose alpha value is 1. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> backgroundColor;
diff --git a/platform/darwin/src/MGLCircleStyleLayer.h b/platform/darwin/src/MGLCircleStyleLayer.h
index 2503595fd1..132d8e223e 100644
--- a/platform/darwin/src/MGLCircleStyleLayer.h
+++ b/platform/darwin/src/MGLCircleStyleLayer.h
@@ -30,7 +30,7 @@ typedef NS_ENUM(NSUInteger, MGLCircleStyleLayerCirclePitchScale) {
/**
The color of the circle.
- The default value of this property is `#000000`. Set this property to `nil` to reset it to the default.
+ The default value of this property is an `NSColor` or `UIColor`object whose RGB value is 0, 0, 0 and whose alpha value is 1. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> circleColor;
@@ -51,21 +51,21 @@ typedef NS_ENUM(NSUInteger, MGLCircleStyleLayerCirclePitchScale) {
/**
The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
- The default value of this property is `0,0`. Set this property to `nil` to reset it to the default.
+ The default value of this property is 0 from the left and 0 from the top. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> circleTranslate;
/**
Control whether the translation is relative to the map (north) or viewport (screen)
- The default value of this property is `map`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLCircleStyleLayerCircleTranslateAnchorMap`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> circleTranslateAnchor;
/**
- Controls the scaling behavior of the circle when the map is pitched. The value `map` scales circles according to their apparent distance to the camera. The value `viewport` results in no pitch-related scaling.
+ Controls the scaling behavior of the circle when the map is pitched. The value `MGLCircleStyleLayerCirclePitchScaleMap` scales circles according to their apparent distance to the camera. The value `MGLCircleStyleLayerCirclePitchScaleViewport` results in no pitch-related scaling.
- The default value of this property is `map`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLCircleStyleLayerCirclePitchScaleMap`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> circlePitchScale;
diff --git a/platform/darwin/src/MGLFillStyleLayer.h b/platform/darwin/src/MGLFillStyleLayer.h
index e5b0e7ffe0..8b64a1c1bc 100644
--- a/platform/darwin/src/MGLFillStyleLayer.h
+++ b/platform/darwin/src/MGLFillStyleLayer.h
@@ -18,7 +18,7 @@ typedef NS_ENUM(NSUInteger, MGLFillStyleLayerFillTranslateAnchor) {
/**
Whether or not the fill should be antialiased.
- The default value of this property is `true`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `YES`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> fillAntialias;
@@ -32,7 +32,7 @@ typedef NS_ENUM(NSUInteger, MGLFillStyleLayerFillTranslateAnchor) {
/**
The color of the filled part of this layer. This color can be specified as rgba with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.
- The default value of this property is `#000000`. Set this property to `nil` to reset it to the default.
+ The default value of this property is an `NSColor` or `UIColor`object whose RGB value is 0, 0, 0 and whose alpha value is 1. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> fillColor;
@@ -44,14 +44,14 @@ typedef NS_ENUM(NSUInteger, MGLFillStyleLayerFillTranslateAnchor) {
/**
The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
- The default value of this property is `0,0`. Set this property to `nil` to reset it to the default.
+ The default value of this property is 0 from the left and 0 from the top. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> fillTranslate;
/**
Control whether the translation is relative to the map (north) or viewport (screen)
- The default value of this property is `map`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLFillStyleLayerFillTranslateAnchorMap`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> fillTranslateAnchor;
diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h
index b772fcc778..dcc8f8e8fe 100644
--- a/platform/darwin/src/MGLLineStyleLayer.h
+++ b/platform/darwin/src/MGLLineStyleLayer.h
@@ -30,14 +30,14 @@ typedef NS_ENUM(NSUInteger, MGLLineStyleLayerLineTranslateAnchor) {
/**
The display of line endings.
- The default value of this property is `butt`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLLineStyleLayerLineCapButt`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> lineCap;
/**
The display of lines when joining.
- The default value of this property is `miter`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLLineStyleLayerLineJoinMiter`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> lineJoin;
@@ -67,21 +67,21 @@ typedef NS_ENUM(NSUInteger, MGLLineStyleLayerLineTranslateAnchor) {
/**
The color with which the line will be drawn.
- The default value of this property is `#000000`. Set this property to `nil` to reset it to the default.
+ The default value of this property is an `NSColor` or `UIColor`object whose RGB value is 0, 0, 0 and whose alpha value is 1. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> lineColor;
/**
The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
- The default value of this property is `0,0`. Set this property to `nil` to reset it to the default.
+ The default value of this property is 0 from the left and 0 from the top. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> lineTranslate;
/**
Control whether the translation is relative to the map (north) or viewport (screen)
- The default value of this property is `map`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLLineStyleLayerLineTranslateAnchorMap`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> lineTranslateAnchor;
diff --git a/platform/darwin/src/MGLStyleLayer.h.ejs b/platform/darwin/src/MGLStyleLayer.h.ejs
index a11ad573d2..b31510aee7 100644
--- a/platform/darwin/src/MGLStyleLayer.h.ejs
+++ b/platform/darwin/src/MGLStyleLayer.h.ejs
@@ -40,7 +40,7 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(prope
/**
<%- propertyDoc(property, type) %><% if ('default' in property) { %>
- The default value of this property is `<%= property.default %>`.<% if (!property.required) { %> Set this property to `nil` to reset it to the default.<% } %><% } %>
+ The default value of this property is <%= propertyDefault(property, type) %>.<% if (!property.required) { %> Set this property to `nil` to reset it to the default.<% } %><% } %>
*/
@property (nonatomic<% if (!property.required) { %>, null_resettable<% } %>) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>;
@@ -52,7 +52,7 @@ typedef NS_ENUM(NSUInteger, MGL<%- camelize(type) %>StyleLayer<%- camelize(prope
/**
<%- propertyDoc(property, type) %><% if ('default' in property) { %>
- The default value of this property is `<%= property.default %>`.<% if (!property.required) { %> Set this property to `nil` to reset it to the default.<% } %><% } %>
+ The default value of this property is <%= propertyDefault(property, type) %>.<% if (!property.required) { %> Set this property to `nil` to reset it to the default.<% } %><% } %>
*/
@property (nonatomic<% if (!property.required) { %>, null_resettable<% } %>) <%- propertyType(property, false, type) %> <%- camelizeWithLeadingLowercase(property.name) %>;
diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h
index 28a96b6bd3..3956e05f3a 100644
--- a/platform/darwin/src/MGLSymbolStyleLayer.h
+++ b/platform/darwin/src/MGLSymbolStyleLayer.h
@@ -72,9 +72,9 @@ typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) {
#pragma mark - Accessing the Layout Attributes
/**
- Label placement relative to its geometry. `line` can only be used on LineStrings and Polygons.
+ Label placement relative to its geometry. `MGLSymbolStyleLayerSymbolPlacementLine` can only be used on LineStrings and Polygons.
- The default value of this property is `point`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLSymbolStyleLayerSymbolPlacementPoint`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> symbolPlacement;
@@ -88,35 +88,35 @@ typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) {
/**
If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer.
- The default value of this property is `false`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `NO`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> symbolAvoidEdges;
/**
If true, the icon will be visible even if it collides with other previously drawn symbols.
- The default value of this property is `false`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `NO`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> iconAllowOverlap;
/**
If true, other symbols can be visible even if they collide with the icon.
- The default value of this property is `false`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `NO`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> iconIgnorePlacement;
/**
If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.
- The default value of this property is `false`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `NO`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> iconOptional;
/**
Orientation of icon when map is rotated.
- The default value of this property is `viewport`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLSymbolStyleLayerIconRotationAlignmentViewport`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> iconRotationAlignment;
@@ -130,14 +130,14 @@ typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) {
/**
Position and scale an icon by the its corresponding text.
- The default value of this property is `none`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLSymbolStyleLayerIconTextFitNone`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> iconTextFit;
/**
Size of padding area around the text-fit size in clockwise order: top, right, bottom, left.
- The default value of this property is `0,0,0,0`. Set this property to `nil` to reset it to the default.
+ The default value of this property is 0 on the top, 0 on the right, 0 on the bottom, and 0 on the left. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> iconTextFitPadding;
@@ -163,26 +163,26 @@ typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) {
/**
If true, the icon may be flipped to prevent it from being rendered upside-down.
- The default value of this property is `false`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `NO`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> iconKeepUpright;
/**
Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up.
- The default value of this property is `0,0`. Set this property to `nil` to reset it to the default.
+ The default value of this property is 0 from the left and 0 from the top. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> iconOffset;
/**
- Aligns text to the plane of the `viewport` or the `map` when the map is pitched. Matches `textRotationAlignment` if unspecified.
+ Aligns text to the plane of the `MGLSymbolStyleLayerTextPitchAlignmentViewport` or the `MGLSymbolStyleLayerTextPitchAlignmentMap` when the map is pitched. Matches `textRotationAlignment` if unspecified.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textPitchAlignment;
/**
Orientation of text when map is rotated.
- The default value of this property is `viewport`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLSymbolStyleLayerTextRotationAlignmentViewport`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textRotationAlignment;
@@ -196,7 +196,7 @@ typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) {
/**
Font stack to use for displaying text.
- The default value of this property is `Open Sans Regular,Arial Unicode MS Regular`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `Open Sans Regular`, `Arial Unicode MS Regular`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textFont;
@@ -231,14 +231,14 @@ typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) {
/**
Text justification options.
- The default value of this property is `center`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLSymbolStyleLayerTextJustifyCenter`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textJustify;
/**
Part of the text placed closest to the anchor.
- The default value of this property is `center`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLSymbolStyleLayerTextAnchorCenter`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textAnchor;
@@ -266,42 +266,42 @@ typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) {
/**
If true, the text may be flipped vertically to prevent it from being rendered upside-down.
- The default value of this property is `true`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `YES`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textKeepUpright;
/**
Specifies how to capitalize text, similar to the CSS `text-transform` property.
- The default value of this property is `none`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLSymbolStyleLayerTextTransformNone`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textTransform;
/**
Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.
- The default value of this property is `0,0`. Set this property to `nil` to reset it to the default.
+ The default value of this property is 0 from the left and 0 from the top. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textOffset;
/**
If true, the text will be visible even if it collides with other previously drawn symbols.
- The default value of this property is `false`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `NO`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textAllowOverlap;
/**
If true, other symbols can be visible even if they collide with the text.
- The default value of this property is `false`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `NO`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textIgnorePlacement;
/**
If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
- The default value of this property is `false`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `NO`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textOptional;
@@ -317,14 +317,14 @@ typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) {
/**
The color of the icon. This can only be used with sdf icons.
- The default value of this property is `#000000`. Set this property to `nil` to reset it to the default.
+ The default value of this property is an `NSColor` or `UIColor`object whose RGB value is 0, 0, 0 and whose alpha value is 1. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> iconColor;
/**
The color of the icon's halo. Icon halos can only be used with sdf icons.
- The default value of this property is `rgba(0, 0, 0, 0)`. Set this property to `nil` to reset it to the default.
+ The default value of this property is an `NSColor` or `UIColor`object whose RGB value is 0, 0, 0 and whose alpha value is 0. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> iconHaloColor;
@@ -345,14 +345,14 @@ typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) {
/**
Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.
- The default value of this property is `0,0`. Set this property to `nil` to reset it to the default.
+ The default value of this property is 0 from the left and 0 from the top. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> iconTranslate;
/**
Control whether the translation is relative to the map (north) or viewport (screen).
- The default value of this property is `map`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLSymbolStyleLayerIconTranslateAnchorMap`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> iconTranslateAnchor;
@@ -366,14 +366,14 @@ typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) {
/**
The color with which the text will be drawn.
- The default value of this property is `#000000`. Set this property to `nil` to reset it to the default.
+ The default value of this property is an `NSColor` or `UIColor`object whose RGB value is 0, 0, 0 and whose alpha value is 1. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textColor;
/**
The color of the text's halo, which helps it stand out from backgrounds.
- The default value of this property is `rgba(0, 0, 0, 0)`. Set this property to `nil` to reset it to the default.
+ The default value of this property is an `NSColor` or `UIColor`object whose RGB value is 0, 0, 0 and whose alpha value is 0. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textHaloColor;
@@ -394,14 +394,14 @@ typedef NS_ENUM(NSUInteger, MGLSymbolStyleLayerTextTranslateAnchor) {
/**
Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.
- The default value of this property is `0,0`. Set this property to `nil` to reset it to the default.
+ The default value of this property is 0 from the left and 0 from the top. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textTranslate;
/**
Control whether the translation is relative to the map (north) or viewport (screen).
- The default value of this property is `map`. Set this property to `nil` to reset it to the default.
+ The default value of this property is `MGLSymbolStyleLayerTextTranslateAnchorMap`. Set this property to `nil` to reset it to the default.
*/
@property (nonatomic, null_resettable) id <MGLStyleAttributeValue> textTranslateAnchor;