Fixed DDS polygon example (#11286)

* [ios] Updated expression

* [ios] Removed centering code
This commit is contained in:
Jordan Kiley
2018-02-23 22:19:51 -08:00
committed by GitHub
parent 8e1fc8ff38
commit db0f6377fc

View File

@@ -1429,7 +1429,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) {
// source, categorical function that sets any feature with a "fill" attribute value of true to red color and anything without to green
MGLFillStyleLayer *fillStyleLayer = [[MGLFillStyleLayer alloc] initWithIdentifier:@"fill-layer" source:shapeSource];
fillStyleLayer.fillColor = [NSExpression expressionWithFormat:@"TERNARY(fill, %@, %@)", [UIColor greenColor], [UIColor redColor]];
fillStyleLayer.fillColor = [NSExpression expressionWithFormat:@"TERNARY(fill == YES, %@, %@)", [UIColor greenColor], [UIColor redColor]];
// source, identity function that sets any feature with an "opacity" attribute to use that value and anything without to 1.0
fillStyleLayer.fillOpacity = [NSExpression expressionWithFormat:@"TERNARY(opacity != nil, opacity, 1.0)"];