GMSCircle
@interface GMSCircle : GMSOverlay
A circle on the Earth’s surface (spherical cap).
-
Position on Earth of circle center. Ignores invalid positions.
Declaration
Swift
var position: CLLocationCoordinate2D { get set }
Objective-C
@property (nonatomic) CLLocationCoordinate2D position;
-
Radius of the circle in meters; must be positive.
Declaration
Swift
var radius: CLLocationDistance { get set }
Objective-C
@property (nonatomic) CLLocationDistance radius;
-
The width of the circle’s outline in screen points. Defaults to 1. As per
GMSPolygon
, the width does not scale when the map is zoomed.Setting strokeWidth to 0 results in no stroke.
Declaration
Swift
var strokeWidth: CGFloat { get set }
Objective-C
@property (nonatomic) CGFloat strokeWidth;
-
The color of this circle’s outline. The default value is black.
Declaration
Swift
var strokeColor: UIColor? { get set }
Objective-C
@property (nonatomic, nullable) UIColor *strokeColor;
-
The interior of the circle is painted with fillColor. The default value is nil, resulting in no fill.
Declaration
Swift
var fillColor: UIColor? { get set }
Objective-C
@property (nonatomic, nullable) UIColor *fillColor;
-
Convenience constructor for
GMSCircle
for a particular position and radius. Other properties will have default values. An invalid position will result in an overlay object that cannot be drawn on the map.Declaration
Swift
convenience init(position: CLLocationCoordinate2D, radius: CLLocationDistance)
Objective-C
+ (nonnull instancetype)circleWithPosition:(CLLocationCoordinate2D)position radius:(CLLocationDistance)radius;