diff options
Diffstat (limited to 'platform/ios/app/MBXViewController.m')
-rw-r--r-- | platform/ios/app/MBXViewController.m | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 3335606f98..f98ee1244d 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -2128,9 +2128,13 @@ CLLocationCoordinate2D randomWorldCoordinate() { return [color colorWithAlphaComponent:0.9]; } -- (UIColor *)mapView:(__unused MGLMapView *)mapView fillColorForPolygonAnnotation:(__unused MGLPolygon *)annotation +- (UIColor *)mapView:(__unused MGLMapView *)mapView fillColorForShape:(MGLShape *)shape { - UIColor *color = annotation.pointCount > 3 ? [UIColor greenColor] : [UIColor redColor]; + UIColor *color = [UIColor redColor]; + if ([shape isKindOfClass:[MGLPolygon class]] && [(MGLPolygon *)shape pointCount] > 3) + { + color = [UIColor greenColor]; + } return [color colorWithAlphaComponent:0.5]; } |