GMSPanoramaService.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // GMSPanoramaService.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. @class GMSPanorama;
  17. GMS_ASSUME_NONNULL_BEGIN
  18. /**
  19. * Callback for when a panorama metadata becomes available.
  20. * If an error occured, |panorama| is nil and |error| is not nil.
  21. * Otherwise, |panorama| is not nil and |error| is nil.
  22. */
  23. typedef void (^GMSPanoramaCallback)(GMSPanorama *GMS_NULLABLE_PTR panorama,
  24. NSError *GMS_NULLABLE_PTR error);
  25. /**
  26. * GMSPanoramaService can be used to request panorama metadata even when a
  27. * GMSPanoramaView is not active.
  28. * Get an instance like this: [[GMSPanoramaService alloc] init].
  29. */
  30. @interface GMSPanoramaService : NSObject
  31. /**
  32. * Retrieves information about a panorama near the given |coordinate|.
  33. * This is an asynchronous request, |callback| will be called with the result.
  34. */
  35. - (void)requestPanoramaNearCoordinate:(CLLocationCoordinate2D)coordinate
  36. callback:(GMSPanoramaCallback)callback;
  37. /**
  38. * Similar to requestPanoramaNearCoordinate:callback: but allows specifying
  39. * a search radius (meters) around |coordinate|.
  40. */
  41. - (void)requestPanoramaNearCoordinate:(CLLocationCoordinate2D)coordinate
  42. radius:(NSUInteger)radius
  43. callback:(GMSPanoramaCallback)callback;
  44. /**
  45. * Retrieves information about a panorama with the given |panoramaID|.
  46. * |callback| will be called with the result. Only panoramaIDs obtained
  47. * from the Google Maps SDK for iOS are supported.
  48. */
  49. - (void)requestPanoramaWithID:(NSString *)panoramaID callback:(GMSPanoramaCallback)callback;
  50. @end
  51. GMS_ASSUME_NONNULL_END