Важно

This feature is available in the Full MapKit SDK version

YMKSearchAddress

class YMKSearchAddress : NSObject

Contains structured address, formatted address, postal code and country code.

Structured address is an ordered list of components (usually administrative hierarchy). Formatted address is a full address as a single string. Formatted address generally can't be obtained from component names. Some components could be ignored (large administrative region) or absent (office number).

Summary

Class methods

 init(formattedAddress: String,
        additionalInfo: String?,
            postalCode: String?,
           countryCode: String?,
            components: [YMKSearchAddressComponent])

Properties

var formattedAddress: String { get }
Human-readable address

var additionalInfo: String? { get }
Additional address info

var postalCode: String? { get }
Postal/Zip code

var countryCode: String? { get }
Country code in ISO 3166-1 alpha-2 format (two-letter country code)

var components: [YMKSearchAddressComponent] { get }
Address component list, see YMKSearchAddressComponent, may be empty

Class methods

init(formattedAddress:additionalInfo:postalCode:countryCode:components:)

 init(formattedAddress: String,
        additionalInfo: String?,
            postalCode: String?,
           countryCode: String?,
            components: [YMKSearchAddressComponent])


Properties

formattedAddress

var formattedAddress: String { get }

Human-readable address.


additionalInfo

var additionalInfo: String? { get }

Additional address info.

Optional field, can be nil.


postalCode

var postalCode: String? { get }

Postal/Zip code.

Optional field, can be nil.


countryCode

var countryCode: String? { get }

Country code in ISO 3166-1 alpha-2 format (two-letter country code).

Optional field, can be nil.


components

var components: [YMKSearchAddressComponent] { get }

Address component list, see YMKSearchAddressComponent, may be empty.


Предыдущая
Следующая