summaryrefslogtreecommitdiff
path: root/platform/darwin
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin')
-rw-r--r--platform/darwin/docs/guides/For Style Authors.md.ejs2
-rw-r--r--platform/darwin/scripts/generate-style-code.js4
-rw-r--r--platform/darwin/src/MGLBackgroundStyleLayer.h8
-rw-r--r--platform/darwin/src/MGLCircleStyleLayer.h26
-rw-r--r--platform/darwin/src/MGLFillStyleLayer.h20
-rw-r--r--platform/darwin/src/MGLLineStyleLayer.h32
-rw-r--r--platform/darwin/src/MGLRasterStyleLayer.h14
-rw-r--r--platform/darwin/src/MGLStyleValue.h24
-rw-r--r--platform/darwin/src/MGLStyleValue.mm6
-rw-r--r--platform/darwin/src/MGLStyleValue_Private.h42
-rw-r--r--platform/darwin/src/MGLSymbolStyleLayer.h114
-rw-r--r--platform/darwin/test/MGLStyleValueTests.swift24
12 files changed, 158 insertions, 158 deletions
diff --git a/platform/darwin/docs/guides/For Style Authors.md.ejs b/platform/darwin/docs/guides/For Style Authors.md.ejs
index 254a7cf219..60797967d0 100644
--- a/platform/darwin/docs/guides/For Style Authors.md.ejs
+++ b/platform/darwin/docs/guides/For Style Authors.md.ejs
@@ -254,7 +254,7 @@ In style JSON | In Objective-C | In Swift
## Setting attribute values
Each property representing a layout or paint attribute is set to an
-`MGLStyleValue` object, which is either an `MGLStyleConstantValue` object (for
+`MGLStyleValue` object, which is either an `MGLConstantStyleValue` object (for
constant values) or an `MGLStyleFunction` object (for zoom level functions). The
style value object is a container for the raw value or function parameters that
you want the attribute to be set to.
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js
index cacca57700..9746c11408 100644
--- a/platform/darwin/scripts/generate-style-code.js
+++ b/platform/darwin/scripts/generate-style-code.js
@@ -184,7 +184,7 @@ global.testGetterImplementation = function (property, layerType, isFunction) {
if (isFunction) {
return `XCTAssertEqualObjects(gLayer.${objCName(property)}, ${value});`;
}
- return `XCTAssert([gLayer.${objCName(property)} isKindOfClass:[MGLStyleConstantValue class]]);
+ return `XCTAssert([gLayer.${objCName(property)} isKindOfClass:[MGLConstantStyleValue class]]);
XCTAssertEqualObjects(gLayer.${objCName(property)}, ${value});`;
}
return `XCTAssertEqualObjects(gLayer.${objCName(property)}, ${value});`;
@@ -281,7 +281,7 @@ global.propertyDoc = function (propertyName, property, layerType, kind) {
doc += `\n\nThis attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#${anchor}"><code>${property.original}</code></a> layout property in the Mapbox Style Specification.`;
}
doc += '\n\nYou can set this property to an instance of:\n\n' +
- '* `MGLStyleConstantValue`\n';
+ '* `MGLConstantStyleValue`\n';
if (property["property-function"]) {
doc += '* `MGLCameraStyleFunction` with an interpolation mode of:\n' +
' * `MGLInterpolationModeExponential`\n' +
diff --git a/platform/darwin/src/MGLBackgroundStyleLayer.h b/platform/darwin/src/MGLBackgroundStyleLayer.h
index c6fd6113cb..0d0eccd685 100644
--- a/platform/darwin/src/MGLBackgroundStyleLayer.h
+++ b/platform/darwin/src/MGLBackgroundStyleLayer.h
@@ -41,7 +41,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -60,7 +60,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -77,7 +77,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -91,7 +91,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
diff --git a/platform/darwin/src/MGLCircleStyleLayer.h b/platform/darwin/src/MGLCircleStyleLayer.h
index b3e9ee7161..7a64c25a23 100644
--- a/platform/darwin/src/MGLCircleStyleLayer.h
+++ b/platform/darwin/src/MGLCircleStyleLayer.h
@@ -91,7 +91,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -117,7 +117,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -142,7 +142,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -168,7 +168,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -195,7 +195,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -224,7 +224,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -242,7 +242,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -267,7 +267,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -293,7 +293,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -321,7 +321,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -353,7 +353,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -375,7 +375,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -401,7 +401,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
diff --git a/platform/darwin/src/MGLFillStyleLayer.h b/platform/darwin/src/MGLFillStyleLayer.h
index a5baf2308c..32b62344c7 100644
--- a/platform/darwin/src/MGLFillStyleLayer.h
+++ b/platform/darwin/src/MGLFillStyleLayer.h
@@ -67,7 +67,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -88,7 +88,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -116,7 +116,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -143,7 +143,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -169,7 +169,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -194,7 +194,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -217,7 +217,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -239,7 +239,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -261,7 +261,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -287,7 +287,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h
index 23a1f8f131..7cfa27e1cc 100644
--- a/platform/darwin/src/MGLLineStyleLayer.h
+++ b/platform/darwin/src/MGLLineStyleLayer.h
@@ -118,7 +118,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -133,7 +133,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -152,7 +152,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -172,7 +172,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -192,7 +192,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -221,7 +221,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -249,7 +249,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -282,7 +282,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -302,7 +302,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -332,7 +332,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -357,7 +357,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -379,7 +379,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -401,7 +401,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -423,7 +423,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -449,7 +449,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -468,7 +468,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
diff --git a/platform/darwin/src/MGLRasterStyleLayer.h b/platform/darwin/src/MGLRasterStyleLayer.h
index 9e876a6e3c..edd88c319d 100644
--- a/platform/darwin/src/MGLRasterStyleLayer.h
+++ b/platform/darwin/src/MGLRasterStyleLayer.h
@@ -52,7 +52,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -75,7 +75,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -93,7 +93,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -111,7 +111,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -133,7 +133,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -151,7 +151,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -167,7 +167,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
diff --git a/platform/darwin/src/MGLStyleValue.h b/platform/darwin/src/MGLStyleValue.h
index 2ce2eae89a..97ab0ddba3 100644
--- a/platform/darwin/src/MGLStyleValue.h
+++ b/platform/darwin/src/MGLStyleValue.h
@@ -33,7 +33,7 @@ typedef NSString *MGLStyleFunctionOption NS_STRING_ENUM;
extern MGL_EXPORT const MGLStyleFunctionOption MGLStyleFunctionOptionInterpolationBase;
/**
- An `MGLStyleConstantValue` object that specifies a default value that a style
+ An `MGLConstantStyleValue` 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
@@ -81,7 +81,7 @@ typedef NS_ENUM(NSUInteger, MGLInterpolationMode) {
`MGLStyleValue` objects.
The `MGLStyleValue` class itself represents a class cluster. Under the hood, a
- particular `MGLStyleValue` object may be either an `MGLStyleConstantValue` to
+ particular `MGLStyleValue` object may be either an `MGLConstantStyleValue` to
represent a constant value or one of the concrete subclasses of
`MGLStyleFunction` to represent a value function. Do not initialize an
`MGLStyleValue` object directly; instead, use one of the class factory methods
@@ -104,10 +104,10 @@ MGL_EXPORT
#pragma mark Creating a Style Value
/**
- Creates and returns an `MGLStyleConstantValue` object containing a raw value.
+ Creates and returns an `MGLConstantStyleValue` object containing a raw value.
@param rawValue The constant value contained by the object.
- @return An `MGLStyleConstantValue` object containing `rawValue`, which is
+ @return An `MGLConstantStyleValue` object containing `rawValue`, which is
treated as a constant value.
*/
+ (instancetype)valueWithRawValue:(T)rawValue;
@@ -181,24 +181,24 @@ MGL_EXPORT
@end
/**
- An `MGLStyleConstantValue` object is a generic container for a style attribute
+ An `MGLConstantStyleValue` object is a generic container for a style attribute
value that remains constant as the zoom level changes. The layout and paint
attribute properties of `MGLStyleLayer` objects can be set to
- `MGLStyleConstantValue` objects.
+ `MGLConstantStyleValue` objects.
- The `MGLStyleConstantValue` class takes a generic parameter `T` that indicates
+ The `MGLConstantStyleValue` class takes a generic parameter `T` that indicates
the Foundation class being wrapped by this class.
*/
MGL_EXPORT
-@interface MGLStyleConstantValue<T> : MGLStyleValue<T>
+@interface MGLConstantStyleValue<T> : MGLStyleValue<T>
#pragma mark Creating a Style Constant Value
/**
- Creates and returns an `MGLStyleConstantValue` object containing a raw value.
+ Creates and returns an `MGLConstantStyleValue` object containing a raw value.
@param rawValue The constant value contained by the object.
- @return An `MGLStyleConstantValue` object containing `rawValue`, which is
+ @return An `MGLConstantStyleValue` object containing `rawValue`, which is
treated as a constant value.
*/
+ (instancetype)valueWithRawValue:(T)rawValue;
@@ -208,10 +208,10 @@ MGL_EXPORT
- (instancetype)init NS_UNAVAILABLE;
/**
- Returns an `MGLStyleConstantValue` object containing a raw value.
+ Returns an `MGLConstantStyleValue` object containing a raw value.
@param rawValue The value contained by the receiver.
- @return An `MGLStyleConstantValue` object containing `rawValue`.
+ @return An `MGLConstantStyleValue` object containing `rawValue`.
*/
- (instancetype)initWithRawValue:(T)rawValue NS_DESIGNATED_INITIALIZER;
diff --git a/platform/darwin/src/MGLStyleValue.mm b/platform/darwin/src/MGLStyleValue.mm
index 020dc27d6a..33b6babadf 100644
--- a/platform/darwin/src/MGLStyleValue.mm
+++ b/platform/darwin/src/MGLStyleValue.mm
@@ -6,7 +6,7 @@ const MGLStyleFunctionOption MGLStyleFunctionOptionDefaultValue = @"MGLStyleFunc
@implementation MGLStyleValue
+ (instancetype)valueWithRawValue:(id)rawValue {
- return [MGLStyleConstantValue valueWithRawValue:rawValue];
+ return [MGLConstantStyleValue valueWithRawValue:rawValue];
}
+ (instancetype)valueWithInterpolationBase:(CGFloat)interpolationBase stops:(NSDictionary *)stops {
@@ -31,7 +31,7 @@ const MGLStyleFunctionOption MGLStyleFunctionOptionDefaultValue = @"MGLStyleFunc
@end
-@implementation MGLStyleConstantValue
+@implementation MGLConstantStyleValue
+ (instancetype)valueWithRawValue:(id)rawValue {
return [[self alloc] initWithRawValue:rawValue];
@@ -52,7 +52,7 @@ const MGLStyleFunctionOption MGLStyleFunctionOptionDefaultValue = @"MGLStyleFunc
return [self.rawValue debugDescription];
}
-- (BOOL)isEqual:(MGLStyleConstantValue *)other {
+- (BOOL)isEqual:(MGLConstantStyleValue *)other {
return [other isKindOfClass:[self class]] && [other.rawValue isEqual:self.rawValue];
}
diff --git a/platform/darwin/src/MGLStyleValue_Private.h b/platform/darwin/src/MGLStyleValue_Private.h
index 3a5ce8d474..0cc30cb6c4 100644
--- a/platform/darwin/src/MGLStyleValue_Private.h
+++ b/platform/darwin/src/MGLStyleValue_Private.h
@@ -55,8 +55,8 @@ public:
return {};
}
- if ([value isKindOfClass:[MGLStyleConstantValue class]]) {
- return toMBGLConstantValue((MGLStyleConstantValue<ObjCType> *)value);
+ if ([value isKindOfClass:[MGLConstantStyleValue class]]) {
+ return toMBGLConstantValue((MGLConstantStyleValue<ObjCType> *)value);
} else if ([value isKindOfClass:[MGLCameraStyleFunction class]]) {
MGLCameraStyleFunction<ObjCType> *cameraStyleFunction = (MGLCameraStyleFunction<ObjCType> *)value;
// Intentionally ignore the stop type set by the developer becuase non interpolatable property values
@@ -86,8 +86,8 @@ public:
return {};
}
- if ([value isKindOfClass:[MGLStyleConstantValue class]]) {
- return toMBGLConstantValue((MGLStyleConstantValue<ObjCType> *)value);
+ if ([value isKindOfClass:[MGLConstantStyleValue class]]) {
+ return toMBGLConstantValue((MGLConstantStyleValue<ObjCType> *)value);
} else if ([value isMemberOfClass:[MGLStyleFunction class]]) {
MGLStyleFunction<ObjCType> *styleFunction = (MGLStyleFunction<ObjCType> *)value;
return toMBGLExponentialCameraFunction(styleFunction);
@@ -119,8 +119,8 @@ public:
// Convert an mgl style value into a mbgl data driven property value
mbgl::style::DataDrivenPropertyValue<MBGLType> toDataDrivenPropertyValue(MGLStyleValue<ObjCType> *value) {
- if ([value isKindOfClass:[MGLStyleConstantValue class]]) {
- return toMBGLConstantValue((MGLStyleConstantValue<ObjCType> *)value);
+ if ([value isKindOfClass:[MGLConstantStyleValue class]]) {
+ return toMBGLConstantValue((MGLConstantStyleValue<ObjCType> *)value);
} else if ([value isKindOfClass:[MGLStyleFunction class]]) {
auto rawValue = toRawStyleSpecValue((MGLStyleFunction<ObjCType> *) value);
auto result = mbgl::style::conversion::convert<mbgl::style::DataDrivenPropertyValue<MBGLType>>(rawValue);
@@ -143,9 +143,9 @@ public:
return {};
}
- if ([value isKindOfClass:[MGLStyleConstantValue class]]) {
+ if ([value isKindOfClass:[MGLConstantStyleValue class]]) {
MBGLEnum mbglValue;
- getMBGLValue([(MGLStyleConstantValue<ObjCType> *)value rawValue], mbglValue);
+ getMBGLValue([(MGLConstantStyleValue<ObjCType> *)value rawValue], mbglValue);
return mbglValue;
} else if ([value isKindOfClass:[MGLCameraStyleFunction class]]) {
MGLCameraStyleFunction<NSValue *> *cameraStyleFunction = (MGLCameraStyleFunction<NSValue *> *)value;
@@ -175,7 +175,7 @@ public:
private: // Private utilities for converting from mgl to mbgl values
- MBGLType toMBGLConstantValue(MGLStyleConstantValue<ObjCType> *value) {
+ MBGLType toMBGLConstantValue(MGLConstantStyleValue<ObjCType> *value) {
MBGLType mbglValue;
getMBGLValue(value.rawValue, mbglValue);
return mbglValue;
@@ -245,7 +245,7 @@ private: // Private utilities for converting from mgl to mbgl values
if ([styleFunction isKindOfClass:[MGLCameraStyleFunction class]]) {
// zoom-only function (no default value)
__block NSMutableArray *stops = [[NSMutableArray alloc] init];
- [styleFunction.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, MGLStyleConstantValue<ObjCType> * _Nonnull outputValue, BOOL * _Nonnull stop) {
+ [styleFunction.stops enumerateKeysAndObjectsUsingBlock:^(NSNumber * _Nonnull zoomKey, MGLConstantStyleValue<ObjCType> * _Nonnull outputValue, BOOL * _Nonnull stop) {
MBGLType dummyMbglValue;
NSArray *rawStop = @[zoomKey, toRawStyleSpecValue([outputValue rawValue], dummyMbglValue)];
[stops addObject:rawStop];
@@ -257,7 +257,7 @@ private: // Private utilities for converting from mgl to mbgl values
rawFunction[@"property"] = sourceStyleFunction.attributeName;
// property-only function
__block NSMutableArray *stops = [[NSMutableArray alloc] init];
- [styleFunction.stops enumerateKeysAndObjectsUsingBlock:^(NSObject * _Nonnull propertyKey, MGLStyleConstantValue<ObjCType> * _Nonnull outputValue, BOOL * _Nonnull stop) {
+ [styleFunction.stops enumerateKeysAndObjectsUsingBlock:^(NSObject * _Nonnull propertyKey, MGLConstantStyleValue<ObjCType> * _Nonnull outputValue, BOOL * _Nonnull stop) {
MBGLType dummyMbglValue;
NSArray *rawStop = @[propertyKey, toRawStyleSpecValue([outputValue rawValue], dummyMbglValue)];
[stops addObject:rawStop];
@@ -266,9 +266,9 @@ private: // Private utilities for converting from mgl to mbgl values
// defaultValue => default
if (sourceStyleFunction.defaultValue) {
- NSCAssert([sourceStyleFunction.defaultValue isKindOfClass:[MGLStyleConstantValue class]], @"Default value must be constant");
+ NSCAssert([sourceStyleFunction.defaultValue isKindOfClass:[MGLConstantStyleValue class]], @"Default value must be constant");
MBGLType dummyMbglValue;
- rawFunction[@"default"] = toRawStyleSpecValue([(MGLStyleConstantValue<ObjCType> *)sourceStyleFunction.defaultValue rawValue], dummyMbglValue);
+ rawFunction[@"default"] = toRawStyleSpecValue([(MGLConstantStyleValue<ObjCType> *)sourceStyleFunction.defaultValue rawValue], dummyMbglValue);
}
} else if ([styleFunction isKindOfClass:[MGLCompositeStyleFunction class]]) {
// zoom-and-property function
@@ -282,8 +282,8 @@ private: // Private utilities for converting from mgl to mbgl values
@"zoom": zoomKey,
@"value": valueKey
};
- MGLStyleConstantValue<ObjCType> *outputValue = stopValue[valueKey];
- NSCAssert([outputValue isKindOfClass:[MGLStyleConstantValue<ObjCType> class]], @"Stop outputs should be MGLStyleConstantValues");
+ MGLConstantStyleValue<ObjCType> *outputValue = stopValue[valueKey];
+ NSCAssert([outputValue isKindOfClass:[MGLConstantStyleValue<ObjCType> class]], @"Stop outputs should be MGLConstantStyleValues");
MBGLType dummyMbglValue;
NSArray *rawStop = @[stopKey, toRawStyleSpecValue([outputValue rawValue], dummyMbglValue)];
[stops addObject:rawStop];
@@ -293,9 +293,9 @@ private: // Private utilities for converting from mgl to mbgl values
// defaultValue => default
if (compositeStyleFunction.defaultValue) {
- NSCAssert([compositeStyleFunction.defaultValue isKindOfClass:[MGLStyleConstantValue class]], @"Default value must be constant");
+ NSCAssert([compositeStyleFunction.defaultValue isKindOfClass:[MGLConstantStyleValue class]], @"Default value must be constant");
MBGLType dummyMbglValue;
- rawFunction[@"default"] = toRawStyleSpecValue([(MGLStyleConstantValue<ObjCType> *)compositeStyleFunction.defaultValue rawValue], dummyMbglValue);
+ rawFunction[@"default"] = toRawStyleSpecValue([(MGLConstantStyleValue<ObjCType> *)compositeStyleFunction.defaultValue rawValue], dummyMbglValue);
}
}
@@ -367,9 +367,9 @@ private: // Private utilities for converting from mgl to mbgl values
void setDefaultMBGLValue(MGLSourceStyleFunction<ObjCType> *sourceStyleFunction, mbgl::style::SourceFunction<MBGLType> &sourceFunction) {
if (sourceStyleFunction.defaultValue) {
- NSCAssert([sourceStyleFunction.defaultValue isKindOfClass:[MGLStyleConstantValue class]], @"Default value must be constant");
+ NSCAssert([sourceStyleFunction.defaultValue isKindOfClass:[MGLConstantStyleValue class]], @"Default value must be constant");
MBGLType mbglValue;
- id mglValue = [(MGLStyleConstantValue<ObjCType> *)sourceStyleFunction.defaultValue rawValue];
+ id mglValue = [(MGLConstantStyleValue<ObjCType> *)sourceStyleFunction.defaultValue rawValue];
getMBGLValue(mglValue, mbglValue);
sourceFunction.defaultValue = mbglValue;
}
@@ -518,7 +518,7 @@ private: // Private utilities for converting from mbgl to mgl values
id operator()(const MBGLEnum &value) const {
auto str = mbgl::Enum<MBGLEnum>::toString(value);
MGLEnum mglType = *mbgl::Enum<MGLEnum>::toEnum(str);
- return [MGLStyleConstantValue<ObjCType> valueWithRawValue:[NSValue value:&mglType withObjCType:@encode(MGLEnum)]];
+ return [MGLConstantStyleValue<ObjCType> valueWithRawValue:[NSValue value:&mglType withObjCType:@encode(MGLEnum)]];
}
id operator()(const mbgl::style::CameraFunction<MBGLEnum> &mbglValue) const {
@@ -671,7 +671,7 @@ private: // Private utilities for converting from mbgl to mgl values
id operator()(const MBGLType &value) const {
auto rawValue = toMGLRawStyleValue(value);
- return [MGLStyleConstantValue<ObjCType> valueWithRawValue:rawValue];
+ return [MGLConstantStyleValue<ObjCType> valueWithRawValue:rawValue];
}
id operator()(const mbgl::style::CameraFunction<MBGLType> &mbglValue) const {
diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h
index a4850a4e18..47d140f91f 100644
--- a/platform/darwin/src/MGLSymbolStyleLayer.h
+++ b/platform/darwin/src/MGLSymbolStyleLayer.h
@@ -299,7 +299,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -324,7 +324,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -342,7 +342,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -364,7 +364,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -392,7 +392,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -422,7 +422,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -443,7 +443,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -468,7 +468,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -500,7 +500,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -522,7 +522,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -544,7 +544,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -567,7 +567,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -590,7 +590,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -617,7 +617,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -646,7 +646,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -674,7 +674,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -702,7 +702,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -728,7 +728,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -746,7 +746,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -767,7 +767,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -788,7 +788,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -824,7 +824,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -845,7 +845,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -877,7 +877,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -904,7 +904,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -930,7 +930,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -955,7 +955,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -978,7 +978,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -999,7 +999,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1021,7 +1021,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1042,7 +1042,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1063,7 +1063,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -1084,7 +1084,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1103,7 +1103,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -1127,7 +1127,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1150,7 +1150,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -1168,7 +1168,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1200,7 +1200,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1229,7 +1229,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1260,7 +1260,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1290,7 +1290,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1319,7 +1319,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1350,7 +1350,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1378,7 +1378,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1413,7 +1413,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1438,7 +1438,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1464,7 +1464,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
@@ -1485,7 +1485,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1513,7 +1513,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1544,7 +1544,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1573,7 +1573,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1601,7 +1601,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1633,7 +1633,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1661,7 +1661,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1696,7 +1696,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1721,7 +1721,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of:
* `MGLInterpolationModeExponential`
* `MGLInterpolationModeInterval`
@@ -1747,7 +1747,7 @@ MGL_EXPORT
You can set this property to an instance of:
- * `MGLStyleConstantValue`
+ * `MGLConstantStyleValue`
* `MGLCameraStyleFunction` with an interpolation mode of
`MGLInterpolationModeInterval`
*/
diff --git a/platform/darwin/test/MGLStyleValueTests.swift b/platform/darwin/test/MGLStyleValueTests.swift
index f965c31e40..784b2fbaf1 100644
--- a/platform/darwin/test/MGLStyleValueTests.swift
+++ b/platform/darwin/test/MGLStyleValueTests.swift
@@ -24,8 +24,8 @@ extension MGLStyleValueTests {
return
}
- if let actualConstant = actual as? MGLStyleConstantValue<MGLColor> {
- assertColorsEqualWithAccuracy(actualConstant.rawValue, (expected as! MGLStyleConstantValue<MGLColor>).rawValue)
+ if let actualConstant = actual as? MGLConstantStyleValue<MGLColor> {
+ assertColorsEqualWithAccuracy(actualConstant.rawValue, (expected as! MGLConstantStyleValue<MGLColor>).rawValue)
} else if let actualFunction = actual as? MGLStyleFunction<MGLColor>,
let expectedFunction = expected as? MGLStyleFunction<MGLColor> {
@@ -55,11 +55,11 @@ extension MGLStyleValueTests {
XCTFail("Expected stop value of type \(type(of: expectedValue)), but found \(type(of: actualValue)) instead.")
return
}
- if let actualValue = actualValue as? MGLStyleConstantValue<MGLColor>,
- let expectedValue = expectedValue as? MGLStyleConstantValue<MGLColor> {
+ if let actualValue = actualValue as? MGLConstantStyleValue<MGLColor>,
+ let expectedValue = expectedValue as? MGLConstantStyleValue<MGLColor> {
assertColorsEqualWithAccuracy(actualValue.rawValue, expectedValue.rawValue)
- } else if let actualValue = actualValue as? MGLStyleConstantValue<AnyObject>,
- let expectedValue = expectedValue as? MGLStyleConstantValue<AnyObject> {
+ } else if let actualValue = actualValue as? MGLConstantStyleValue<AnyObject>,
+ let expectedValue = expectedValue as? MGLConstantStyleValue<AnyObject> {
XCTAssertEqual(actualValue, expectedValue)
} else {
XCTFail("Unsupported stop value type \(type(of: actualValue)).")
@@ -90,16 +90,16 @@ extension MGLStyleValueTests {
let circleStyleLayer = MGLCircleStyleLayer(identifier: "circleLayer", source: shapeSource)
// Boolean
- symbolStyleLayer.iconAllowsOverlap = MGLStyleConstantValue(rawValue: true)
- XCTAssertEqual((symbolStyleLayer.iconAllowsOverlap as! MGLStyleConstantValue<NSNumber>).rawValue, true)
+ symbolStyleLayer.iconAllowsOverlap = MGLConstantStyleValue(rawValue: true)
+ XCTAssertEqual((symbolStyleLayer.iconAllowsOverlap as! MGLConstantStyleValue<NSNumber>).rawValue, true)
// Number
- symbolStyleLayer.iconHaloWidth = MGLStyleConstantValue(rawValue: 3)
- XCTAssertEqual((symbolStyleLayer.iconHaloWidth as! MGLStyleConstantValue<NSNumber>).rawValue, 3)
+ symbolStyleLayer.iconHaloWidth = MGLConstantStyleValue(rawValue: 3)
+ XCTAssertEqual((symbolStyleLayer.iconHaloWidth as! MGLConstantStyleValue<NSNumber>).rawValue, 3)
// String
- symbolStyleLayer.text = MGLStyleConstantValue(rawValue: "{name}")
- XCTAssertEqual((symbolStyleLayer.text as! MGLStyleConstantValue<NSString>).rawValue, "{name}")
+ symbolStyleLayer.text = MGLConstantStyleValue(rawValue: "{name}")
+ XCTAssertEqual((symbolStyleLayer.text as! MGLConstantStyleValue<NSString>).rawValue, "{name}")
var circleTranslationOne = CGVector(dx: 100, dy: 0)
let circleTranslationValueOne = NSValue(bytes: &circleTranslationOne, objCType: "{CGVector=dd}")