Home > @magiclane/maps-sdk > AddressInfo

AddressInfo class

Address info class Places

Signature:

export declare class AddressInfo 

Constructors

Constructor

Modifiers

Description

(constructor)()

Creates a new empty AddressInfo instance.

The new instance contains no address fields initially; use [setField] to populate it.

Methods

Method

Modifiers

Description

equals(other)

Checks equality based on the internal map. Equivalent to Dart's operator ==.

format(options)

Returns the address formatted as a single, human-readable line.

The method builds a concise, display-friendly address by selecting the relevant address components, trimming whitespace, omitting null or empty values, collapsing adjacent duplicates, and joining the remaining parts with a readable separator (", "). The ordering of components follows a common mailing/display convention.

fromJson(json)

static

Deserializes a JSON-compatible object to create an instance.

Used internally, not intended for direct use by consumers. The expected list structure may change without notice.

getField(field)

Get address field name.

getHashCode()

Generates a hash code for the instance. Equivalent to Dart's get hashCode.

setField(str, field)

Set address field name.

toJson()

Serializes this instance to a JSON-compatible object.

Used internally, not intended for direct use by consumers. The list structure may change without notice.