A geographic location.

Hierarchy

Implements

Constructors

Properties

props: Map<string, any>

The object that all properties are stored on.

Accessors

  • get country(): undefined | string
  • An ISO 3166-1 alpha-2 character country code.

    Returns undefined | string

  • set country(val): void
  • Parameters

    • val: null | string

    Returns void

  • get elevation(): undefined | number
  • The elevation above sea level, in meters.

    Returns undefined | number

  • set elevation(val): void
  • Parameters

    • val: null | number

    Returns void

  • get id(): undefined | number
  • A SolarNetwork assigned unique identifier.

    Returns undefined | number

  • set id(val): void
  • Parameters

    • val: null | number

    Returns void

  • get latitude(): undefined | number
  • The decimal world latitude.

    Returns undefined | number

  • set latitude(val): void
  • Parameters

    • val: null | number

    Returns void

  • get locality(): undefined | string
  • Get the locality (city, town).

    Returns undefined | string

  • set locality(val): void
  • Parameters

    • val: null | string

    Returns void

  • get longitude(): undefined | number
  • The decimal world longitude.

    Returns undefined | number

  • set longitude(val): void
  • Parameters

    • val: null | number

    Returns void

  • get name(): undefined | string
  • A generalized name, can be used for "virtual" locations.

    Returns undefined | string

  • set name(val): void
  • Parameters

    • val: null | string

    Returns void

  • get postalCode(): undefined | string
  • A country-specific postal code.

    Returns undefined | string

  • set postalCode(val): void
  • Parameters

    • val: null | string

    Returns void

  • get region(): undefined | string
  • A country-specific regional identifier.

    Returns undefined | string

  • set region(val): void
  • Parameters

    • val: null | string

    Returns void

  • get size(): number
  • Get the number of properties configured.

    Returns number

  • get stateOrProvince(): undefined | string
  • A country-specific state or province identifier.

    Returns undefined | string

  • set stateOrProvince(val): void
  • Parameters

    • val: null | string

    Returns void

  • get street(): undefined | string
  • The street address.

    Returns undefined | string

  • set street(val): void
  • Parameters

    • val: null | string

    Returns void

  • get timeZoneId(): undefined | string
  • A time zone ID, for example Pacific/Auckland.

    Returns undefined | string

  • set timeZoneId(val): void
  • Parameters

    • val: null | string

    Returns void

Methods

  • Get an iterator over the property entries.

    Returns IterableIterator<[string, any]>

    iterator over [k, v] values

  • Get a property value.

    Parameters

    • key: string

      the key to get

    Returns any

    the associated value for the given key

  • Set or remove a property value.

    Parameters

    • key: string

      the key to set the value for

    • newValue: any

      the new value to set for the given key; if null then the key property will be removed

    Returns Location

    this object

  • Get this object as a standard URI encoded (query parameters) string value.

    All enumerable properties of the props property will be added to the result. If any property value is an array, the values of the array will be joined by a comma. Any Util.Enum values will have their name property used.

    Parameters

    • Optional propertyName: string

      an optional object property prefix to add to all properties

    • Optional callbackFn: PropMapUriEncodingCallbackFn

      An optional function that will be called for each property. The function will be passed property name and value arguments, and must return either undefined to skip the property, a 2 or 3-element array with the property name and value to use, and an optional boolean to force array values to use mutliple parameter keys. Any other return value causes the property to be used as-is.

    Returns string

    the URI encoded string

  • Get this object as a standard URI encoded (query parameters) string value with sorting and pagination parameters.

    This calls Util.PropMap.toUriEncoding first, then encodes the sorts and pagination parameters, if provided.

    Parameters

    • Optional sorts: SortDescriptor[]

      optional sort settings to use

    • Optional pagination: Pagination

      optional pagination settings to use

    • Optional propertyName: string

      an optional object property prefix to add to all properties

    • Optional callbackFn: PropMapUriEncodingCallbackFn

      An optional function that will be called for each property. The function will be passed property name and value arguments, and must return either undefined to skip the property, a 2-element array with the property name and value to use, or anything else to use the property as-is.

    Returns string

    the URI encoded string

Generated using TypeDoc