GMSPolygon.h 1.56 KB
Newer Older
Julio Hermosa committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
//
//  GMSPolygon.h
//  Google Maps SDK for iOS
//
//  Copyright 2013 Google LLC
//
//  Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of
//  Service: https://developers.google.com/maps/terms
//

#import <UIKit/UIKit.h>

#import "GMSOverlay.h"

@class GMSPath;
@class GMSPolygonLayer;

NS_ASSUME_NONNULL_BEGIN

/**
 * GMSPolygon defines a polygon that appears on the map. A polygon (like a polyline) defines a
 * series of connected coordinates in an ordered sequence; additionally, polygons form a closed loop
 * and define a filled region.
 */
@interface GMSPolygon : GMSOverlay

/** The path that describes this polygon. The coordinates composing the path must be valid. */
@property(nonatomic, copy, nullable) GMSPath *path;

/**
 * The array of GMSPath instances that describes any holes in this polygon. The coordinates
 * composing each path must be valid.
 */
@property(nonatomic, copy, nullable) NSArray<GMSPath *> *holes;

/** The width of the polygon outline in screen points. Defaults to 1. */
@property(nonatomic) CGFloat strokeWidth;

/** The color of the polygon outline. Defaults to nil. */
@property(nonatomic, nullable) UIColor *strokeColor;

/** The fill color. Defaults to blueColor. */
@property(nonatomic, nullable) UIColor *fillColor;

/** Whether this polygon should be rendered with geodesic correction. */
@property(nonatomic) BOOL geodesic;

/**
 * Convenience constructor for GMSPolygon for a particular path. Other properties will have default
 * values.
 */
+ (instancetype)polygonWithPath:(nullable GMSPath *)path;

@end

NS_ASSUME_NONNULL_END