From 8d94cbdb5751fb9cd5056bd2c350bf6afacf4483 Mon Sep 17 00:00:00 2001 From: jmkiley Date: Tue, 19 Jun 2018 13:30:51 -0700 Subject: [ios] updated predicates --- platform/ios/app/MBXViewController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 163a379675..167f07d296 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -928,7 +928,7 @@ CLLocationCoordinate2D randomWorldCoordinate() { MGLFillExtrusionStyleLayer* layer = [[MGLFillExtrusionStyleLayer alloc] initWithIdentifier:@"extrudedBuildings" source:source]; layer.sourceLayerIdentifier = @"building"; - layer.predicate = [NSPredicate predicateWithFormat:@"extrude == 'true' AND height > 0"]; + layer.predicate = [NSPredicate predicateWithFormat:@"extrude == 'true' AND CAST(height, 'NSNumber') > 0"]; layer.fillExtrusionBase = [NSExpression expressionForKeyPath:@"min_height"]; layer.fillExtrusionHeight = [NSExpression expressionForKeyPath:@"height"]; @@ -1110,7 +1110,7 @@ CLLocationCoordinate2D randomWorldCoordinate() { MGLFillStyleLayer *regionsLayer = (MGLFillStyleLayer *)[self.mapView.style layerWithIdentifier:@"regions"]; // filter (testing both inline and format strings) - regionsLayer.predicate = [NSPredicate predicateWithFormat:@"HRRNUM >= %@ AND HRRNUM < 300", @(200)]; + regionsLayer.predicate = [NSPredicate predicateWithFormat:@"CAST(HRRNUM, 'NSNumber') >= %@ AND CAST(HRRNUM, 'NSNumber') < 300", @(200)]; // paint properties regionsLayer.fillColor = [NSExpression expressionForConstantValue:[UIColor blueColor]]; -- cgit v1.2.1