GMSGroundOverlay.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. //
  2. // GMSGroundOverlay.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 <GoogleMaps/GMSOverlay.h>
  11. @class GMSCoordinateBounds;
  12. /**
  13. * GMSGroundOverlay specifies the available options for a ground overlay that
  14. * exists on the Earth's surface. Unlike a marker, the position of a ground
  15. * overlay is specified explicitly and it does not face the camera.
  16. */
  17. @interface GMSGroundOverlay : GMSOverlay
  18. /**
  19. * The position of this GMSGroundOverlay, or more specifically, the physical
  20. * position of its anchor. If this is changed, |bounds| will be moved around
  21. * the new position.
  22. */
  23. @property(nonatomic, assign) CLLocationCoordinate2D position;
  24. /**
  25. * The anchor specifies where this GMSGroundOverlay is anchored to the Earth in
  26. * relation to |bounds|. If this is modified, |position| will be set to the
  27. * corresponding new position within |bounds|.
  28. */
  29. @property(nonatomic, assign) CGPoint anchor;
  30. /**
  31. * Icon to render within |bounds| on the Earth. If this is nil, the overlay will
  32. * not be visible (unlike GMSMarker which has a default image).
  33. */
  34. @property(nonatomic, strong) UIImage *icon;
  35. /**
  36. * Bearing of this ground overlay, in degrees. The default value, zero, points
  37. * this ground overlay up/down along the normal Y axis of the earth.
  38. */
  39. @property(nonatomic, assign) CLLocationDirection bearing;
  40. /**
  41. * The 2D bounds on the Earth in which |icon| is drawn. Changing this value
  42. * will adjust |position| accordingly.
  43. */
  44. @property(nonatomic, strong) GMSCoordinateBounds *bounds;
  45. /**
  46. * Convenience constructor for GMSGroundOverlay for a particular |bounds| and
  47. * |icon|. Will set |position| accordingly.
  48. */
  49. + (instancetype)groundOverlayWithBounds:(GMSCoordinateBounds *)bounds
  50. icon:(UIImage *)icon;
  51. /**
  52. * Constructs a GMSGroundOverlay that renders the given |icon| at |position|,
  53. * as if the image's actual size matches camera pixels at |zoomLevel|.
  54. */
  55. + (instancetype)groundOverlayWithPosition:(CLLocationCoordinate2D)position
  56. icon:(UIImage *)icon
  57. zoomLevel:(CGFloat)zoomLevel;
  58. @end
  59. /**
  60. * The default position of the ground anchor of a GMSGroundOverlay: the center
  61. * point of the icon.
  62. */
  63. FOUNDATION_EXTERN const CGPoint kGMSGroundOverlayDefaultAnchor;