GMSMapView+Animation.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // GMSMapView+Animation.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/GMSMapView.h>
  11. #if __has_feature(modules)
  12. @import GoogleMapsBase;
  13. #else
  14. #import <GoogleMapsBase/GoogleMapsBase.h>
  15. #endif
  16. GMS_ASSUME_NONNULL_BEGIN
  17. /**
  18. * GMSMapView (Animation) offers several animation helper methods.
  19. *
  20. * During any animation, retrieving the camera position through the camera
  21. * property on GMSMapView returns an intermediate immutable GMSCameraPosition.
  22. * This camera position will typically represent the most recently drawn frame.
  23. */
  24. @interface GMSMapView (Animation)
  25. /** Animates the camera of this map to |cameraPosition|. */
  26. - (void)animateToCameraPosition:(GMSCameraPosition *)cameraPosition;
  27. /**
  28. * As animateToCameraPosition:, but changes only the location of the camera
  29. * (i.e., from the current location to |location|).
  30. */
  31. - (void)animateToLocation:(CLLocationCoordinate2D)location;
  32. /**
  33. * As animateToCameraPosition:, but changes only the zoom level of the camera.
  34. * This value is clamped by [kGMSMinZoomLevel, kGMSMaxZoomLevel].
  35. */
  36. - (void)animateToZoom:(float)zoom;
  37. /**
  38. * As animateToCameraPosition:, but changes only the bearing of the camera (in
  39. * degrees). Zero indicates true north.
  40. */
  41. - (void)animateToBearing:(CLLocationDirection)bearing;
  42. /**
  43. * As animateToCameraPosition:, but changes only the viewing angle of the camera
  44. * (in degrees). This value will be clamped to a minimum of zero (i.e., facing
  45. * straight down) and between 30 and 45 degrees towards the horizon, depending
  46. * on the relative closeness to the earth.
  47. */
  48. - (void)animateToViewingAngle:(double)viewingAngle;
  49. /**
  50. * Applies |cameraUpdate| to the current camera, and then uses the result as
  51. * per animateToCameraPosition:.
  52. */
  53. - (void)animateWithCameraUpdate:(GMSCameraUpdate *)cameraUpdate;
  54. @end
  55. GMS_ASSUME_NONNULL_END