GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSAddress
@interface GMSAddress : NSObject <NSCopying, NSSecureCoding>
A result from a reverse geocode request, containing a human-readable address. This class is
immutable and should not be instantiated directly unless under testing circumstances. Obtain an
instance via GMSGeocoder
.
Some of the fields may be nil, indicating they are not present.
-
Location, or kLocationCoordinate2DInvalid if unknown.
Declaration
Swift
var coordinate: CLLocationCoordinate2D { get }
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
-
Declaration
Swift
var thoroughfare: String? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *thoroughfare;
-
Declaration
Swift
var locality: String? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *locality;
-
Subdivision of locality, district or park.
Declaration
Swift
var subLocality: String? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *subLocality;
-
Region/State/Administrative area.
Declaration
Swift
var administrativeArea: String? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *administrativeArea;
-
Declaration
Swift
var postalCode: String? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *postalCode;
-
Declaration
Swift
var country: String? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *country;
-
An array of NSString
containing formatted lines of the address. May be nil.
Declaration
Swift
var lines: [String]? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) NSArray<NSString *> *lines;
-
Deprecated
This method is obsolete and will be removed in a future release. Use the lines property instead.
Returns the first line of the address.
Declaration
Swift
func addressLine1() -> String?
Objective-C
- (nullable NSString *)addressLine1;
-
Deprecated
This method is obsolete and will be removed in a future release. Use the lines property instead.
Returns the second line of the address.
Declaration
Swift
func addressLine2() -> String?
Objective-C
- (nullable NSString *)addressLine2;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSAddress\u003c/code\u003e stores human-readable address information obtained from reverse geocoding requests using \u003ccode\u003eGMSGeocoder\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt contains properties for various address components like coordinate, street, city, region, postal code, and country.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003elines\u003c/code\u003e property provides an array of formatted address lines, offering a comprehensive representation.\u003c/p\u003e\n"],["\u003cp\u003eWhile \u003ccode\u003eaddressLine1\u003c/code\u003e and \u003ccode\u003eaddressLine2\u003c/code\u003e were previously used, they are now deprecated in favor of the \u003ccode\u003elines\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eSome address fields may be nil if the information is unavailable.\u003c/p\u003e\n"]]],[],null,["# GoogleNavigation Framework Reference\n\nGMSAddress\n==========\n\n @interface GMSAddress : NSObject \u003cNSCopying, NSSecureCoding\u003e\n\nA result from a reverse geocode request, containing a human-readable address. This class is\nimmutable and should not be instantiated directly unless under testing circumstances. Obtain an\ninstance via [GMSGeocoder](../Classes/GMSGeocoder.html).\n\nSome of the fields may be nil, indicating they are not present.\n- `\n ``\n ``\n `\n\n ### [coordinate](#/c:objc(cs)GMSAddress(py)coordinate)\n\n `\n ` \n Location, or kLocationCoordinate2DInvalid if unknown. \n\n #### Declaration\n\n Swift \n\n var coordinate: CLLocationCoordinate2D { get }\n\n Objective-C \n\n @property (nonatomic, readonly) CLLocationCoordinate2D coordinate;\n\n- `\n ``\n ``\n `\n\n ### [thoroughfare](#/c:objc(cs)GMSAddress(py)thoroughfare)\n\n `\n ` \n Street number and name. \n\n #### Declaration\n\n Swift \n\n var thoroughfare: String? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) NSString *thoroughfare;\n\n- `\n ``\n ``\n `\n\n ### [locality](#/c:objc(cs)GMSAddress(py)locality)\n\n `\n ` \n Locality or city. \n\n #### Declaration\n\n Swift \n\n var locality: String? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) NSString *locality;\n\n- `\n ``\n ``\n `\n\n ### [subLocality](#/c:objc(cs)GMSAddress(py)subLocality)\n\n `\n ` \n Subdivision of locality, district or park. \n\n #### Declaration\n\n Swift \n\n var subLocality: String? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) NSString *subLocality;\n\n- `\n ``\n ``\n `\n\n ### [administrativeArea](#/c:objc(cs)GMSAddress(py)administrativeArea)\n\n `\n ` \n Region/State/Administrative area. \n\n #### Declaration\n\n Swift \n\n var administrativeArea: String? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) NSString *administrativeArea;\n\n- `\n ``\n ``\n `\n\n ### [postalCode](#/c:objc(cs)GMSAddress(py)postalCode)\n\n `\n ` \n Postal/Zip code. \n\n #### Declaration\n\n Swift \n\n var postalCode: String? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) NSString *postalCode;\n\n- `\n ``\n ``\n `\n\n ### [country](#/c:objc(cs)GMSAddress(py)country)\n\n `\n ` \n The country name. \n\n #### Declaration\n\n Swift \n\n var country: String? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) NSString *country;\n\n- `\n ``\n ``\n `\n\n ### [lines](#/c:objc(cs)GMSAddress(py)lines)\n\n `\n ` \n An array of `NSString` containing formatted lines of the address. May be nil. \n\n #### Declaration\n\n Swift \n\n var lines: [String]? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) NSArray\u003cNSString *\u003e *lines;\n\n- `\n ``\n ``\n `\n\n ### [-addressLine1](#/c:objc(cs)GMSAddress(im)addressLine1)\n\n `\n ` \n Deprecated\n\n This method is obsolete and will be removed in a future release. Use the lines property instead. \n Returns the first line of the address. \n\n #### Declaration\n\n Swift \n\n func addressLine1() -\u003e String?\n\n Objective-C \n\n - (nullable NSString *)addressLine1;\n\n- `\n ``\n ``\n `\n\n ### [-addressLine2](#/c:objc(cs)GMSAddress(im)addressLine2)\n\n `\n ` \n Deprecated\n\n This method is obsolete and will be removed in a future release. Use the lines property instead. \n Returns the second line of the address. \n\n #### Declaration\n\n Swift \n\n func addressLine2() -\u003e String?\n\n Objective-C \n\n - (nullable NSString *)addressLine2;"]]