GMSOverlay.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // GMSOverlay.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. #import <CoreLocation/CoreLocation.h>
  11. #if __has_feature(modules)
  12. @import GoogleMapsBase;
  13. #else
  14. #import <GoogleMapsBase/GoogleMapsBase.h>
  15. #endif
  16. GMS_ASSUME_NONNULL_BEGIN
  17. @class GMSMapView;
  18. /**
  19. * GMSOverlay is an abstract class that represents some overlay that may be
  20. * attached to a specific GMSMapView. It may not be instantiated directly;
  21. * instead, instances of concrete overlay types should be created directly
  22. * (such as GMSMarker, GMSPolyline, and GMSPolygon).
  23. *
  24. * This supports the NSCopying protocol; [overlay_ copy] will return a copy
  25. * of the overlay type, but with |map| set to nil.
  26. */
  27. @interface GMSOverlay : NSObject<NSCopying>
  28. /**
  29. * Title, a short description of the overlay. Some overlays, such as markers,
  30. * will display the title on the map. The title is also the default
  31. * accessibility text.
  32. */
  33. @property(nonatomic, copy) NSString *GMS_NULLABLE_PTR title;
  34. /**
  35. * The map this overlay is on. Setting this property will add the overlay to the
  36. * map. Setting it to nil removes this overlay from the map. An overlay may be
  37. * active on at most one map at any given time.
  38. */
  39. @property(nonatomic, weak) GMSMapView *GMS_NULLABLE_PTR map;
  40. /**
  41. * If this overlay should cause tap notifications. Some overlays, such as
  42. * markers, will default to being tappable.
  43. */
  44. @property(nonatomic, assign, getter=isTappable) BOOL tappable;
  45. /**
  46. * Higher |zIndex| value overlays will be drawn on top of lower |zIndex|
  47. * value tile layers and overlays. Equal values result in undefined draw
  48. * ordering. Markers are an exception that regardless of |zIndex|, they will
  49. * always be drawn above tile layers and other non-marker overlays; they
  50. * are effectively considered to be in a separate z-index group compared to
  51. * other overlays.
  52. */
  53. @property(nonatomic, assign) int zIndex;
  54. @end
  55. GMS_ASSUME_NONNULL_END