GMSAddress.h 2.0 KB

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