Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LocationSearchSuggestion

Represents one of the suggestions returned from the GeoStream server that matches the search term entered as part of a location search query.

Hierarchy

Implements

Index

Constructors

constructor

  • new LocationSearchSuggestion(resultType: LocationSearchResultType, location: LatLon, intersection: LatLon, boundingBox: BoundingBox, confidence: number, name: string, streetNumber: number, streetName: string, regionLevel: number, regions: string[], subregions: string[], postcode: string, country: Country, linkId: number, vendor: string, poiTypes: PoiType[], displayText: string, displayTextWithCountry: string, customData: Object, streetNumberFull?: string, units?: AddressUnit[]): LocationSearchSuggestion

Properties

boundingBox

boundingBox: BoundingBox

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

confidence

confidence: number

The confidence in the suggestion. 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.

customData

customData: Object

A dictionary of custom data that can be used by custom search sources to provide additional data on suggestions beyond what is specified in other properties.

displayText

displayText: string

A concise one line summary of the suggestion for use when displaying it in a list of results. Contains information used to identify the suggestion in this context, such as name and address, excluding country.

displayTextWithCountry

displayTextWithCountry: string

A concise one line summary of the suggestion for use when displaying it in a list of results. Contains information used to identify the suggestion in this context, such as name and address, including 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 'Empty' if the suggestion has no single location.

linkId

linkId: number

The link ID of the StreetLink on which the suggestion is located. Set to 0 if the result is not associated with a link.

location

location: LatLon

The LatLon object representing the suggestion's location.

name

name: string

The name of the search suggestion.

poiTypes

poiTypes: PoiType[]

The PoiTypes of the suggestion. Applicable only when ResultType is a point of interest type. Defaults to an empty array.

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 location search result. For example a street, region or post code.

streetName

streetName: string

The name of the street for the suggestion. Set to null if not a street suggestion.

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).

Optional units

units: AddressUnit[]

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

vendor

vendor: string

The vendor of the StreetLink on which the suggestion is located. Set to null when the result is not associated with a link.

Static ASSEMBLY_NAME

ASSEMBLY_NAME: string = GEOBASE_ASSEMBLY_NAME

Static CLASS_NAME

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

Static INVALID_REGION_LEVEL

INVALID_REGION_LEVEL: number = -999

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