diff options
author | jmkiley <jordan.kiley@mapbox.com> | 2018-02-22 12:14:20 -0800 |
---|---|---|
committer | jmkiley <jordan.kiley@mapbox.com> | 2018-02-22 12:14:20 -0800 |
commit | a26ae08c590a507493682f9e51a8f68265412794 (patch) | |
tree | a15854805c7d36d5064d2115c926d9913b80cb0a | |
parent | b79a1cc82e21bb8249d871691d6a4d250cd6a97c (diff) | |
download | qtlocation-mapboxgl-a26ae08c590a507493682f9e51a8f68265412794.tar.gz |
[ios] Updated expression
-rw-r--r-- | platform/ios/app/MBXViewController.m | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 7c8e9fe570..f8d6a7417b 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -1429,11 +1429,13 @@ 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)"]; [self.mapView.style addLayer:fillStyleLayer]; + [self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(37.75741564287944, -122.44640350341795)]; + self.mapView.zoomLevel = 15; } - (void)addLatLonGrid |