GMSMapView+Animation.h 1.8 KB

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