GMSPlaceLocationOptions.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // GMSPlaceLocationOptions.h
  3. // Google Places SDK for iOS
  4. //
  5. // Copyright 2019 Google LLC
  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. NS_ASSUME_NONNULL_BEGIN
  12. #pragma mark - Protocols
  13. /*
  14. * Protocol for specifying that the location can be used as search bias.
  15. */
  16. @protocol GMSPlaceLocationBias <NSObject, NSCopying>
  17. /*
  18. * Returns the location bias as |NSURLQueryItem|.
  19. */
  20. - (NSURLQueryItem *)locationBiasURLQueryItem;
  21. @end
  22. /*
  23. * Protocol for specifying that the location can be used as search restriction.
  24. */
  25. @protocol GMSPlaceLocationRestriction <NSObject, NSCopying>
  26. /*
  27. * Returns the location restriction as |NSURLQueryItem|.
  28. */
  29. - (NSURLQueryItem *)locationRestrictionURLQueryItem;
  30. @end
  31. /*
  32. * Returns a rectangular location to filter place results inside the boundaries.
  33. * Supports filtering as a restriction where results must be inside the bounds, or as a bias where
  34. * results in the bounds are preferred.
  35. *
  36. * @param northEastBounds The north east corner of the bounds.
  37. * @param southWestBounds The south west corner of the bounds.
  38. */
  39. FOUNDATION_EXTERN id<GMSPlaceLocationBias, GMSPlaceLocationRestriction>
  40. GMSPlaceRectangularLocationOption(CLLocationCoordinate2D northEastBounds,
  41. CLLocationCoordinate2D southWestBounds);
  42. NS_ASSUME_NONNULL_END