GMSPolygonLayer.h 1.45 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
//
//  GMSPolygonLayer.h
//  Google Maps SDK for iOS
//
//  Copyright 2018 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 <CoreLocation/CoreLocation.h>
#import <UIKit/UIKit.h>

#import "GMSOverlayLayer.h"

NS_ASSUME_NONNULL_BEGIN

/**
 * GMSPolygonLayer is a subclass of GMSOverlayLayer, available on a per-polygon basis, that allows
 * animation of several properties of its associated GMSPolygon.
 *
 * Note that this CALayer is never actually rendered directly, as GMSMapView is provided entirely
 * via an OpenGL layer. As such, adjustments or animations to 'default' properties of CALayer will
 * not have any effect.
 */
@interface GMSPolygonLayer : GMSOverlayLayer

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

/**
 * The color of the polygon outline. This is an assign property, there is an expectation for the
 * GMSPolygon to own the reference if necessary.
 */
@property(nonatomic, assign, nullable) CGColorRef strokeColor;

/**
 * The fill color. This is an assign property, there is an expectation for the GMSPolygon to own the
 * reference if necessary.
 */
@property(nonatomic, assign, nullable) CGColorRef fillColor;

@end

extern NSString *const kGMSPolygonLayerStrokeWidth;
extern NSString *const kGMSPolygonLayerStrokeColor;
extern NSString *const kGMSPolygonLayerFillColor;

NS_ASSUME_NONNULL_END