summaryrefslogtreecommitdiff
path: root/platform/darwin/src/NSExpression+MGLAdditions.mm
diff options
context:
space:
mode:
authorFabian Guerra Soto <fabian.guerra@mapbox.com>2018-04-23 09:05:36 -0400
committerGitHub <noreply@github.com>2018-04-23 09:05:36 -0400
commita45670cfb5752866b9c8130024a313944684c2db (patch)
tree9964a1ec295d5033204062f221615c0bcc54344a /platform/darwin/src/NSExpression+MGLAdditions.mm
parent991264ae657303e172ba1cdd1aa56eb27b951c92 (diff)
downloadqtlocation-mapboxgl-a45670cfb5752866b9c8130024a313944684c2db.tar.gz
[ios, macos] Rename featureProperties to featureAttributes. (#11748)
* [ios, macos] Rename featureProperties to featureAttributes. * [ios, macos] Update style documentation. * [ios, macos] Remove featureProperties variable tests. * [ios, macos] Update the changelogs.
Diffstat (limited to 'platform/darwin/src/NSExpression+MGLAdditions.mm')
-rw-r--r--platform/darwin/src/NSExpression+MGLAdditions.mm10
1 files changed, 7 insertions, 3 deletions
diff --git a/platform/darwin/src/NSExpression+MGLAdditions.mm b/platform/darwin/src/NSExpression+MGLAdditions.mm
index df7e3e98f4..c82a7dc008 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];