diff --git a/platform/darwin/docs/guides/For Style Authors.md.ejs b/platform/darwin/docs/guides/For Style Authors.md.ejs
index bca894c06..2ae660222 100644
--- a/platform/darwin/docs/guides/For Style Authors.md.ejs
+++ b/platform/darwin/docs/guides/For Style Authors.md.ejs
@@ -341,7 +341,7 @@ In style specification | Method, function, or predicate type | Format string syn
`typeof` | |
`geometry-type` | `NSExpression.geometryTypeVariableExpression` | `$geometryType`
`id` | `NSExpression.featureIdentifierVariableExpression` | `$featureIdentifier`
-`properties` | `NSExpression.featurePropertiesVariableExpression` | `$featureProperties`
+`properties` | `NSExpression.featureAttributesVariableExpression` | `$featureAttributes`
`at` | `objectFrom:withIndex:` | `array[n]`
`get` | `+[NSExpression expressionForKeyPath:]` | Key path
`has` | `mgl_does:have:` | `mgl_does:have:(self, 'key')`
diff --git a/platform/darwin/docs/guides/Predicates and Expressions.md b/platform/darwin/docs/guides/Predicates and Expressions.md
index b45434053..c3b3d39a5 100644
--- a/platform/darwin/docs/guides/Predicates and Expressions.md
+++ b/platform/darwin/docs/guides/Predicates and Expressions.md
@@ -630,7 +630,7 @@ otherwise TRUE.
mgl_has:FUNCTION($featureProperties, 'mgl_has:', '🧀🍔')FUNCTION($featureAttributes, 'mgl_has:', '🧀🍔')NSExpression that evaluates to an NSDictionary
diff --git a/platform/darwin/src/NSExpression+MGLAdditions.h b/platform/darwin/src/NSExpression+MGLAdditions.h
index 64cbe9741..cfdf27aad 100644
--- a/platform/darwin/src/NSExpression+MGLAdditions.h
+++ b/platform/darwin/src/NSExpression+MGLAdditions.h
@@ -80,7 +80,9 @@ extern MGL_EXPORT const MGLExpressionInterpolationMode MGLExpressionInterpolatio
properties
expression operator in the Mapbox Style Specification.
*/
-@property (class, nonatomic, readonly) NSExpression *featurePropertiesVariableExpression;
+@property (class, nonatomic, readonly) NSExpression *featureAttributesVariableExpression;
+
+@property (class, nonatomic, readonly) NSExpression *featurePropertiesVariableExpression __attribute__((deprecated("Use -featureAttributesVariableExpression.")));
#pragma mark Creating Conditional Expressions
diff --git a/platform/darwin/src/NSExpression+MGLAdditions.mm b/platform/darwin/src/NSExpression+MGLAdditions.mm
index df7e3e98f..c82a7dc00 100644
--- a/platform/darwin/src/NSExpression+MGLAdditions.mm
+++ b/platform/darwin/src/NSExpression+MGLAdditions.mm
@@ -656,8 +656,12 @@ NS_DICTIONARY_OF(NSNumber *, NSExpression *) *MGLStopDictionaryByReplacingTokens
return [NSExpression expressionForVariable:@"featureIdentifier"];
}
++ (NSExpression *)featureAttributesVariableExpression {
+ return [NSExpression expressionForVariable:@"featureAttributes"];
+}
+
+ (NSExpression *)featurePropertiesVariableExpression {
- return [NSExpression expressionForVariable:@"featureProperties"];
+ return [self featureAttributesVariableExpression];
}
+ (instancetype)mgl_expressionForConditional:(nonnull NSPredicate *)conditionPredicate trueExpression:(nonnull NSExpression *)trueExpression falseExpresssion:(nonnull NSExpression *)falseExpression {
@@ -901,7 +905,7 @@ NSArray *MGLSubexpressionsWithJSONObjects(NSArray *objects) {
} else if ([op isEqualToString:@"id"]) {
return NSExpression.featureIdentifierVariableExpression;
} else if ([op isEqualToString:@"properties"]) {
- return NSExpression.featurePropertiesVariableExpression;
+ return NSExpression.featureAttributesVariableExpression;
} else if ([op isEqualToString:@"var"]) {
return [NSExpression expressionForVariable:argumentObjects.firstObject];
} else if ([op isEqualToString:@"case"]) {
@@ -1000,7 +1004,7 @@ NSArray *MGLSubexpressionsWithJSONObjects(NSArray *objects) {
if ([self.variable isEqualToString:@"featureIdentifier"]) {
return @[@"id"];
}
- if ([self.variable isEqualToString:@"featureProperties"]) {
+ if ([self.variable isEqualToString:@"featureAttributes"]) {
return @[@"properties"];
}
return @[@"var", self.variable];
diff --git a/platform/darwin/test/MGLExpressionTests.mm b/platform/darwin/test/MGLExpressionTests.mm
index d7c86ed07..d54e961b0 100644
--- a/platform/darwin/test/MGLExpressionTests.mm
+++ b/platform/darwin/test/MGLExpressionTests.mm
@@ -183,9 +183,9 @@ using namespace std::string_literals;
XCTAssertEqualObjects([NSExpression expressionWithMGLJSONObject:@[@"id"]], expression);
}
{
- NSExpression *expression = [NSExpression expressionForVariable:@"featureProperties"];
+ NSExpression *expression = [NSExpression expressionForVariable:@"featureAttributes"];
XCTAssertEqualObjects(expression.mgl_jsonExpressionObject, @[@"properties"]);
- XCTAssertEqualObjects([NSExpression expressionWithFormat:@"$featureProperties"].mgl_jsonExpressionObject, @[@"properties"]);
+ XCTAssertEqualObjects([NSExpression expressionWithFormat:@"$featureAttributes"].mgl_jsonExpressionObject, @[@"properties"]);
XCTAssertEqualObjects([NSExpression expressionWithMGLJSONObject:@[@"properties"]], expression);
}
{
@@ -867,7 +867,7 @@ using namespace std::string_literals;
}
{
NSExpression *expression = [NSExpression expressionForFunction:@"mgl_does:have:"
- arguments:@[[NSExpression expressionForVariable:@"featureProperties"],
+ arguments:@[[NSExpression expressionForVariable:@"featureAttributes"],
[NSExpression expressionForConstantValue:@"x"]]];
NSArray *jsonExpression = @[@"has", @"x", @[@"properties"]];
XCTAssertEqualObjects(expression.mgl_jsonExpressionObject, jsonExpression);
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index c7e9b053c..4c69d94ec 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -2,6 +2,12 @@
Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started.
+## 4.0.1
+
+### Style layers
+
+* Deprecated `+[NSExpression featurePropertiesVariableExpression]` use `+[NSExpression featureAttributesVariableExpression]` instead. ([#11748](https://github.com/mapbox/mapbox-gl-native/pull/11748))
+
## 4.0.0 - April 19, 2018
The 4.0._x_ series of releases will be the last to support iOS 8. The minimum iOS deployment version will increase to iOS 9.0 in a future release.
diff --git a/platform/ios/docs/guides/For Style Authors.md b/platform/ios/docs/guides/For Style Authors.md
index fa65b3ccb..b3beea854 100644
--- a/platform/ios/docs/guides/For Style Authors.md
+++ b/platform/ios/docs/guides/For Style Authors.md
@@ -331,7 +331,7 @@ In style specification | Method, function, or predicate type | Format string syn
`typeof` | |
`geometry-type` | `NSExpression.geometryTypeVariableExpression` | `$geometryType`
`id` | `NSExpression.featureIdentifierVariableExpression` | `$featureIdentifier`
-`properties` | `NSExpression.featurePropertiesVariableExpression` | `$featureProperties`
+`properties` | `NSExpression.featureAttributesVariableExpression` | `$featureAttributes`
`at` | `objectFrom:withIndex:` | `array[n]`
`get` | `+[NSExpression expressionForKeyPath:]` | Key path
`has` | `mgl_does:have:` | `mgl_does:have:(self, 'key')`
diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md
index 37a6ed39c..498ed3c37 100644
--- a/platform/macos/CHANGELOG.md
+++ b/platform/macos/CHANGELOG.md
@@ -1,5 +1,11 @@
# Changelog for Mapbox Maps SDK for macOS
+## 0.7.1
+
+### Style layers
+
+* Deprecated `+[NSExpression featurePropertiesVariableExpression]` use `+[NSExpression featureAttributesVariableExpression]` instead. ([#11748](https://github.com/mapbox/mapbox-gl-native/pull/11748))
+
## 0.7.0 - April 19, 2018
The 0.7._x_ series of releases will be the last to support macOS 10.10. The minimum macOS deployment version will increase to macOS 10.11.0 in a future release.
diff --git a/platform/macos/docs/guides/For Style Authors.md b/platform/macos/docs/guides/For Style Authors.md
index fff70d0a9..22182c781 100644
--- a/platform/macos/docs/guides/For Style Authors.md
+++ b/platform/macos/docs/guides/For Style Authors.md
@@ -324,7 +324,7 @@ In style specification | Method, function, or predicate type | Format string syn
`typeof` | |
`geometry-type` | `NSExpression.geometryTypeVariableExpression` | `$geometryType`
`id` | `NSExpression.featureIdentifierVariableExpression` | `$featureIdentifier`
-`properties` | `NSExpression.featurePropertiesVariableExpression` | `$featureProperties`
+`properties` | `NSExpression.featureAttributesVariableExpression` | `$featureAttributes`
`at` | `objectFrom:withIndex:` | `array[n]`
`get` | `+[NSExpression expressionForKeyPath:]` | Key path
`has` | `mgl_does:have:` | `mgl_does:have:(self, 'key')`