GMSPolygon.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //
  2. // GMSPolygon.h
  3. // Google Maps SDK for iOS
  4. //
  5. // Copyright 2013 Google Inc.
  6. //
  7. // Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of
  8. // Service: https://developers.google.com/maps/terms
  9. //
  10. #if __has_feature(modules)
  11. @import GoogleMapsBase;
  12. #else
  13. #import <GoogleMapsBase/GoogleMapsBase.h>
  14. #endif
  15. #import <GoogleMaps/GMSOverlay.h>
  16. GMS_ASSUME_NONNULL_BEGIN
  17. @class GMSPath;
  18. /**
  19. * GMSPolygon defines a polygon that appears on the map. A polygon (like a polyline) defines a
  20. * series of connected coordinates in an ordered sequence; additionally, polygons form a closed loop
  21. * and define a filled region.
  22. */
  23. @interface GMSPolygon : GMSOverlay
  24. /** The path that describes this polygon. The coordinates composing the path must be valid. */
  25. @property(nonatomic, copy) GMSPath *GMS_NULLABLE_PTR path;
  26. /**
  27. * The array of GMSPath instances that describes any holes in this polygon. The coordinates
  28. * composing each path must be valid.
  29. */
  30. @property(nonatomic, copy) GMS_NSArrayOf(GMSPath *) * GMS_NULLABLE_PTR holes;
  31. /** The width of the polygon outline in screen points. Defaults to 1. */
  32. @property(nonatomic, assign) CGFloat strokeWidth;
  33. /** The color of the polygon outline. Defaults to nil. */
  34. @property(nonatomic, strong) UIColor *GMS_NULLABLE_PTR strokeColor;
  35. /** The fill color. Defaults to blueColor. */
  36. @property(nonatomic, strong) UIColor *GMS_NULLABLE_PTR fillColor;
  37. /** Whether this polygon should be rendered with geodesic correction. */
  38. @property(nonatomic, assign) BOOL geodesic;
  39. /**
  40. * Convenience constructor for GMSPolygon for a particular path. Other properties will have default
  41. * values.
  42. */
  43. + (instancetype)polygonWithPath:(GMSPath *GMS_NULLABLE_PTR)path;
  44. @end
  45. GMS_ASSUME_NONNULL_END