GMSPlace.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. //
  2. // GMSPlace.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/GMSAddress.h>
  12. @class GMSPlaceUserData;
  13. /** Describes the current open status of a place. */
  14. typedef NS_ENUM(NSInteger, GMSPlacesOpenNowStatus) {
  15. /** The place is open now. */
  16. kGMSPlacesOpenNowStatusYes,
  17. /** The place is not open now. */
  18. kGMSPlacesOpenNowStatusNo,
  19. /** We don't know whether the place is open now. */
  20. kGMSPlacesOpenNowStatusUnknown,
  21. };
  22. typedef NS_ENUM(NSInteger, GMSPlacesPriceLevel) {
  23. kGMSPlacesPriceLevelUnknown = -1,
  24. kGMSPlacesPriceLevelFree = 0,
  25. kGMSPlacesPriceLevelCheap = 1,
  26. kGMSPlacesPriceLevelMedium = 2,
  27. kGMSPlacesPriceLevelHigh = 3,
  28. kGMSPlacesPriceLevelExpensive = 4,
  29. };
  30. /**
  31. * Represents a particular physical place. A GMSPlace encapsulates information about a physical
  32. * location, including its name, location, and any other information we might have about it. This
  33. * class is immutable.
  34. */
  35. @interface GMSPlace : NSObject
  36. /** Name of the place. */
  37. @property(nonatomic, copy, readonly) NSString *name;
  38. /** Place ID of this place. */
  39. @property(nonatomic, copy, readonly) NSString *placeID;
  40. /**
  41. * Location of the place. The location is not necessarily the center of the Place, or any
  42. * particular entry or exit point, but some arbitrarily chosen point within the geographic extent of
  43. * the Place.
  44. */
  45. @property(nonatomic, readonly) CLLocationCoordinate2D coordinate;
  46. /**
  47. * Represents the open now status of the place at the time that the place was created.
  48. */
  49. @property(nonatomic, readonly) GMSPlacesOpenNowStatus openNowStatus;
  50. /**
  51. * Phone number of this place, in international format, i.e. including the country code prefixed
  52. * with "+". For example, Google Sydney's phone number is "+61 2 9374 4000".
  53. */
  54. @property(nonatomic, copy, readonly) NSString *phoneNumber;
  55. /**
  56. * Address of the place as a simple string.
  57. */
  58. @property(nonatomic, copy, readonly) NSString *formattedAddress;
  59. /**
  60. * Five-star rating for this place based on user reviews.
  61. *
  62. * Ratings range from 1.0 to 5.0. 0.0 means we have no rating for this place (e.g. because not
  63. * enough users have reviewed this place).
  64. */
  65. @property(nonatomic, readonly) float rating;
  66. /**
  67. * Price level for this place, as integers from 0 to 4.
  68. *
  69. * e.g. A value of 4 means this place is "$$$$" (expensive). A value of 0 means free (such as a
  70. * museum with free admission).
  71. */
  72. @property(nonatomic, readonly) GMSPlacesPriceLevel priceLevel;
  73. /**
  74. * The types of this place. Types are NSStrings, valid values are any types documented at
  75. * <https://developers.google.com/places/supported_types>.
  76. */
  77. @property(nonatomic, copy, readonly) NSArray *types;
  78. /** Website for this place. */
  79. @property(nonatomic, copy, readonly) NSURL *website;
  80. /**
  81. * The data provider attribution string for this place.
  82. *
  83. * These are provided as a NSAttributedString, which may contain hyperlinks to the website of each
  84. * provider.
  85. *
  86. * In general, these must be shown to the user if data from this GMSPlace is shown, as described in
  87. * the Places API Terms of Service.
  88. */
  89. @property(nonatomic, copy, readonly) NSAttributedString *attributions;
  90. @end