GMSAddress.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //
  2. // GMSAddress.h
  3. // Google Maps SDK for iOS
  4. //
  5. // Copyright 2014 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. #import <GoogleMaps/GMSDeprecationMacros.h>
  17. GMS_ASSUME_NONNULL_BEGIN
  18. /**
  19. * A result from a reverse geocode request, containing a human-readable address. This class is
  20. * immutable and should be obtained via GMSGeocoder.
  21. *
  22. * Some of the fields may be nil, indicating they are not present.
  23. */
  24. @interface GMSAddress : NSObject<NSCopying>
  25. /** Location, or kLocationCoordinate2DInvalid if unknown. */
  26. @property(nonatomic, readonly) CLLocationCoordinate2D coordinate;
  27. /** Street number and name. */
  28. @property(nonatomic, copy, readonly) NSString *GMS_NULLABLE_PTR thoroughfare;
  29. /** Locality or city. */
  30. @property(nonatomic, copy, readonly) NSString *GMS_NULLABLE_PTR locality;
  31. /** Subdivision of locality, district or park. */
  32. @property(nonatomic, copy, readonly) NSString *GMS_NULLABLE_PTR subLocality;
  33. /** Region/State/Administrative area. */
  34. @property(nonatomic, copy, readonly) NSString *GMS_NULLABLE_PTR administrativeArea;
  35. /** Postal/Zip code. */
  36. @property(nonatomic, copy, readonly) NSString *GMS_NULLABLE_PTR postalCode;
  37. /** The country name. */
  38. @property(nonatomic, copy, readonly) NSString *GMS_NULLABLE_PTR country;
  39. /** An array of NSString containing formatted lines of the address. May be nil. */
  40. @property(nonatomic, copy, readonly) GMS_NSArrayOf(NSString *) *GMS_NULLABLE_PTR lines;
  41. /**
  42. * Returns the first line of the address.
  43. *
  44. * This method is obsolete and deprecated and will be removed in a future release.
  45. * Use the lines property instead.
  46. */
  47. - (NSString *GMS_NULLABLE_PTR)addressLine1 __GMS_AVAILABLE_BUT_DEPRECATED;
  48. /**
  49. * Returns the second line of the address.
  50. *
  51. * This method is obsolete and deprecated and will be removed in a future release.
  52. * Use the lines property instead.
  53. */
  54. - (NSString *GMS_NULLABLE_PTR)addressLine2 __GMS_AVAILABLE_BUT_DEPRECATED;
  55. @end
  56. /**
  57. * The former type of geocode results (pre-1.7). This remains here for migration and will be
  58. * removed in future releases.
  59. */
  60. @compatibility_alias GMSReverseGeocodeResult GMSAddress;
  61. GMS_ASSUME_NONNULL_END