diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2019-04-28 17:23:23 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2019-05-07 22:04:48 -0700 |
commit | 910639168aaad8f06749c5be184ae50dbe9d566b (patch) | |
tree | 9bd1642efe2c9ed65b51a8a317602975b7c5c73f /platform/ios/src/MGLMapViewDelegate.h | |
parent | 84a11ba4e5a6c64edd63b81d606e2ae57862c798 (diff) | |
download | qtlocation-mapboxgl-upstream/1ec5-circle-2167.tar.gz |
[ios, macos] Added circle geometryupstream/1ec5-circle-2167
Added an MGLCircle class that generates a many-sided polygon under the hood.
Diffstat (limited to 'platform/ios/src/MGLMapViewDelegate.h')
-rw-r--r-- | platform/ios/src/MGLMapViewDelegate.h | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/platform/ios/src/MGLMapViewDelegate.h b/platform/ios/src/MGLMapViewDelegate.h index 055d4c9517..c6128ae953 100644 --- a/platform/ios/src/MGLMapViewDelegate.h +++ b/platform/ios/src/MGLMapViewDelegate.h @@ -1,11 +1,19 @@ #import <UIKit/UIKit.h> -#import "Mapbox.h" #import "MGLCameraChangeReason.h" NS_ASSUME_NONNULL_BEGIN +@protocol MGLAnnotation; +@protocol MGLCalloutView; +@class MGLAnnotationImage; +@class MGLAnnotationView; +@class MGLCircle; +@class MGLMapCamera; @class MGLMapView; +@class MGLPolygon; +@class MGLPolyline; +@class MGLShape; /** The `MGLMapViewDelegate` protocol defines a set of optional methods that you @@ -422,25 +430,25 @@ NS_ASSUME_NONNULL_BEGIN */ - (UIColor *)mapView:(MGLMapView *)mapView strokeColorForShapeAnnotation:(MGLShape *)annotation; +- (UIColor *)mapView:(MGLMapView *)mapView fillColorForPolygonAnnotation:(MGLPolygon *)annotation __attribute__((deprecated("", "-mapView:fillColorForShape:"))); + /** - Returns the color to use when rendering the fill of a polygon annotation. + Returns the color to use when rendering the fill of a shape annotation. + + This method is only called for `MGLPolygon` and `MGLCircle` annotations. It is + not possible to fill a polyline or point annotation. - The default fill color is the map view’s tint color. If a pattern color is + The default fill color is the selected menu item color. If a pattern color is specified, the result is undefined. Opacity may be set by specifying an alpha component. The default alpha value is `1.0` and results in a completely opaque shape. @param mapView The map view rendering the polygon annotation. - @param annotation The annotation being rendered. - @return The polygon’s interior fill color. - - #### Related examples - See the <a href="https://docs.mapbox.com/ios/maps/examples/polygon/">Add - a polygon annotation</a> example to learn how to modify the color of a an - `MGLPolygon` at runtime. + @param shape The annotation being rendered. + @return The shape’s fill color. */ -- (UIColor *)mapView:(MGLMapView *)mapView fillColorForPolygonAnnotation:(MGLPolygon *)annotation; +- (UIColor *)mapView:(MGLMapView *)mapView fillColorForShape:(MGLShape *)shape; /** Returns the line width in points to use when rendering the outline of a |