GMSAddress Class Reference

GMSAddress Class Reference

Overview

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.

Public Member Functions

(nullable NSString *) - addressLine1
 Returns the first line of the address.
(nullable NSString *) - addressLine2
 Returns the second line of the address.

Properties

CLLocationCoordinate2D coordinate
 Location, or kLocationCoordinate2DInvalid if unknown.
NSString * thoroughfare
 Street number and name.
NSString * locality
 Locality or city.
NSString * subLocality
 Subdivision of locality, district or park.
NSString * administrativeArea
 Region/State/Administrative area.
NSString * postalCode
 Postal/Zip code.
NSString * country
 The country name.
NSArray< NSString * > * lines
 An array of NSString containing formatted lines of the address.

Member Function Documentation

- (nullable NSString *) addressLine1

Returns the first line of the address.

Note:
This is deprecated. This method is obsolete and will be removed in a future release. Use the lines property instead.
- (nullable NSString *) addressLine2

Returns the second line of the address.

Note:
This is deprecated. This method is obsolete and will be removed in a future release. Use the lines property instead.

Property Documentation

- (CLLocationCoordinate2D) coordinate [read, assign]

Location, or kLocationCoordinate2DInvalid if unknown.

- (NSString*) thoroughfare [read, copy]

Street number and name.

- (NSString*) locality [read, copy]

Locality or city.

- (NSString*) subLocality [read, copy]

Subdivision of locality, district or park.

- (NSString*) administrativeArea [read, copy]

Region/State/Administrative area.

- (NSString*) postalCode [read, copy]

Postal/Zip code.

- (NSString*) country [read, copy]

The country name.

- (NSArray<NSString *>*) lines [read, copy]

An array of NSString containing formatted lines of the address.

May be nil.