Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AutocompleteGeocoderSuggestion

Represents one of the suggestions returned from the GeoStream server that matches the search term entered as part of an Autocomplete Geocoding operation.

Hierarchy

Implements

Index

Constructors

constructor

  • new AutocompleteGeocoderSuggestion(resultType: AutocompleteGeocoderResultType, isCity: boolean, isSuburb: boolean, mileMarkerDistance: number, confidence: number, regionLevel: number, name: string, streetNumber: number, isStreetNameOnly: boolean, suffix: string, regions: string[], subregions: string[], postcode: string, country: Country, addressConvention: AddressConvention, location: LatLon, intersection: LatLon, boundingBox: BoundingBox, formattedAddress?: string, formattedAddressWithCountry?: string, streetNumberFull?: string, units?: AddressUnit[]): AutocompleteGeocoderSuggestion
  • Initializes an AutocompleteGeocoderSuggestion object, which holds one of the suggestions that was returned as part of the results of an Autocomplete Geocoding operation.

    Parameters

    • resultType: AutocompleteGeocoderResultType
    • isCity: boolean
    • isSuburb: boolean
    • mileMarkerDistance: number
    • confidence: number
    • regionLevel: number
    • name: string
    • streetNumber: number
    • isStreetNameOnly: boolean
    • suffix: string
    • regions: string[]
    • subregions: string[]
    • postcode: string
    • country: Country
    • addressConvention: AddressConvention
    • location: LatLon
    • intersection: LatLon
    • boundingBox: BoundingBox
    • Optional formattedAddress: string
    • Optional formattedAddressWithCountry: string
    • Optional streetNumberFull: string
    • Optional units: AddressUnit[]

    Returns AutocompleteGeocoderSuggestion

Properties

addressConvention

addressConvention: AddressConvention

Indicates whether the address conventions in the country of the suggested street/region place the street number before the street name (e.g. "20 Enterprise"), or after the street name (e.g. "Ave. Santa Fe 94").

boundingBox

boundingBox: BoundingBox

The bounding box of a region. This field will only be populated for region suggestions; for other suggestions, this will return null.

confidence

confidence: number

The AutocompleteGeocoder's confidence in the result. The confidence is a decimal number between 0 and 1, with 1 representing the highest confidence.

country

country: Country

The country in which the suggestion is located.

Optional formattedAddress

formattedAddress: string

The address for the suggestion, excluding the country.

Optional formattedAddressWithCountry

formattedAddressWithCountry: string

The address for the suggestion, including the country.

intersection

intersection: LatLon

A LatLon representing the point where the address connects with the street network. This location is preferred over Location when reverse geocoding. May be set to LatLon.Empty if the suggestion has no single location.

isCity

isCity: boolean

Whether or not the suggestion is for a city.

isStreetNameOnly

isStreetNameOnly: boolean

Indicates whether a street suggestion is a street-name-only result, as opposed to a full street address suggestion. This property is deprecated and should not be used.

isSuburb

isSuburb: boolean

Whether or not the suggestion is for a suburb.

location

location: LatLon

The LatLon object representing the suggestion's location.

mileMarkerDistance

mileMarkerDistance: number

The MileMarker distance from the start of a highway.

name

name: string

The name of the search suggestion.

postcode

postcode: string

The post or zip code for this suggestion.

regionLevel

regionLevel: number

The region level, which is used to create a list of region names in the appropriate order (from most specific to least specific).

regions

regions: string[]

The list of regions for this suggestion, with the most specific region (e.g. city) first.

resultType

The type of result for this Autocomplete Geocoding operation. One of Street, Region, PostCode, MileMarker, or None.

streetNumber

streetNumber: number

The street number of the suggestion. This takes numbers only, unlike streetNumberFull.

Optional streetNumberFull

streetNumberFull: string

The street number of the suggestion e.g. 20, 5b or 10-12. This takes characters aside from just numbers, unlike streetNumber.

subregions

subregions: string[]

The list of subregions for this suggestion (e.g. suburbs within a city).

suffix

suffix: string

Returns a string containing all elements of the address other than the first line, which can be accessed via Name. For street address result, this will return all region names, while for a region result, this will return all region names other than the most specific region. The string will be prefixed by a comma, and components will be comma separated. The suffix does not consider the locale of the address; if you want a formatted address that reflects the current locale, use ToString().

Optional units

units: AddressUnit[]

The list of address units, such as an apartment or floor.

Static ASSEMBLY_NAME

ASSEMBLY_NAME: string = GEOBASE_ASSEMBLY_NAME

Static CLASS_NAME

CLASS_NAME: string = "Telogis.GeoBase.Geocoding.AutocompleteGeocoderSuggestion"

Static INVALID_STREET_NUMBER

INVALID_STREET_NUMBER: number = -1

Methods

Protected _toAddressData

  • _toAddressData(isStreetResult: boolean, isPostcodeResult: boolean, isRegionResult: boolean): IAddressData

getStreetNumber

  • getStreetNumber(): string
  • Returns the street number of this suggestion as a string. If this suggestion doesn't have a valid street number, returns null instead.

    Returns string

    the street number for the suggestion, or null if there is no street number

toAddressData

Generated using TypeDoc