# Coveo DistanceResources Component (CoveoDistanceResources)

## Index

### Methods

- debugInfo
- disable
- enable
- getBindings
- getLastPositionRequest
- setPosition
- get

### Properties

- bind
- componentOptionsModel
- componentStateModel
- disabled
- logger
- queryController
- queryStateModel
- root
- searchInterface
- ID

### Accessors

- usageAnalytics

### Component Options

- cancelQueryUntilPositionResolved
- disabledDistanceCssClass
- distanceField
- googleApiKey
- latitudeField
- latitudeValue
- longitudeField
- longitudeValue
- triggerNewQueryOnNewPosition
- unitConversionFactor
- useNavigator

### Constructors

- constructor

## Methods

### debugInfo

- debugInfo(): any

- Inherited from BaseComponent.debugInfo

  - Defined in ui/Base/BaseComponent.ts :41

  #### Returns any

### disable

- disable(): void

- Inherited from BaseComponent.disable

  - Defined in ui/Base/BaseComponent.ts :52

  #### Returns void

### enable

- enable(): void

- Inherited from BaseComponent.enable

  - Defined in ui/Base/BaseComponent.ts :61

  #### Returns void

### getBindings

- getBindings(): IComponentBindings

- Inherited from Component.getBindings

  - Defined in ui/Base/Component.ts :328

  #### Returns IComponentBindings

### getLastPositionRequest

- getLastPositionRequest(): Promise<IGeolocationPosition>

- - Defined in ui/Distance/DistanceResources.ts :247

  #### Returns Promise<IGeolocationPosition>

  A promise of the last resolved position value.

### setPosition

- setPosition(latitude: number, longitude: number): void

- - Defined in ui/Distance/DistanceResources.ts :220

  #### Parameters

  - ##### latitude: number

  - ##### longitude: number

  #### Returns void

### Static get

- get(element: HTMLElement, componentClass?: any, noThrow?: boolean): BaseComponent

- Inherited from Component.get

  - Defined in ui/Base/Component.ts :410

  #### Parameters

  - ##### element: HTMLElement

  - ##### Optional componentClass: any

  - ##### Optional noThrow: boolean

  #### Returns BaseComponent

## Properties

### bind

bind: ComponentEvents

Inherited from Component.bind

- Defined in ui/Base/Component.ts :270

### componentOptionsModel

componentOptionsModel: ComponentOptionsModel

Inherited from Component.componentOptionsModel

- Defined in ui/Base/Component.ts :294

### componentStateModel

componentStateModel: ComponentStateModel

Inherited from Component.componentStateModel

- Defined in ui/Base/Component.ts :282

### disabled

disabled: boolean

Inherited from BaseComponent.disabled

- Defined in ui/Base/BaseComponent.ts :23

### logger

logger: Logger

Inherited from BaseComponent.logger

- Defined in ui/Base/BaseComponent.ts :18

### queryController

queryController: QueryController

Inherited from Component.queryController

- Defined in ui/Base/Component.ts :286

### queryStateModel

queryStateModel: QueryStateModel

Inherited from Component.queryStateModel

- Defined in ui/Base/Component.ts :278

### root

root: HTMLElement

Inherited from Component.root

- Defined in ui/Base/Component.ts :274

### searchInterface

searchInterface: SearchInterface

Inherited from Component.searchInterface

- Defined in ui/Base/Component.ts :290

### Static ID

ID: string

Inherited from BaseComponent.ID

- Defined in ui/Base/BaseComponent.ts :28

## Accessors

### usageAnalytics

usageAnalytics:

Inherited from Component.usageAnalytics

- Defined in ui/Base/Component.ts :343

## Component Options

### cancelQueryUntilPositionResolved

cancelQueryUntilPositionResolved: boolean

- Defined in ui/Distance/DistanceResources.ts :189

Markup configuration example(s) :

    data-cancel-query-until-position-resolved='true'
    data-cancel-query-until-position-resolved='false'

### disabledDistanceCssClass

disabledDistanceCssClass: string

- Defined in ui/Distance/DistanceResources.ts :128

Markup configuration example(s) :

    data-disabled-distance-css-class='foo'

### distanceField

distanceField: IFieldOption

- Defined in ui/Distance/DistanceResources.ts :71

Markup configuration example(s) :

    data-distance-field='@foo'

### googleApiKey

googleApiKey: string

- Defined in ui/Distance/DistanceResources.ts :160

Markup configuration example(s) :

    data-google-api-key='foo'

### latitudeField

latitudeField: IFieldOption

- Defined in ui/Distance/DistanceResources.ts :86

Markup configuration example(s) :

    data-latitude-field='@foo'

### latitudeValue

latitudeValue: number

- Defined in ui/Distance/DistanceResources.ts :139

Markup configuration example(s) :

    data-latitude-value='10'

### longitudeField

longitudeField: IFieldOption

- Defined in ui/Distance/DistanceResources.ts :101

Markup configuration example(s) :

    data-longitude-field='@foo'

### longitudeValue

longitudeValue: number

- Defined in ui/Distance/DistanceResources.ts :150

Markup configuration example(s) :

    data-longitude-value='10'

### triggerNewQueryOnNewPosition

triggerNewQueryOnNewPosition: boolean

- Defined in ui/Distance/DistanceResources.ts :180

Markup configuration example(s) :

    data-trigger-new-query-on-new-position='true'
    data-trigger-new-query-on-new-position='false'

### unitConversionFactor

unitConversionFactor: number

- Defined in ui/Distance/DistanceResources.ts :115

Markup configuration example(s) :

    data-unit-conversion-factor='10'

### useNavigator

useNavigator: boolean

- Defined in ui/Distance/DistanceResources.ts :173

Markup configuration example(s) :

    data-use-navigator='true'
    data-use-navigator='false'

## Constructors

### constructor

- new DistanceResources(element: HTMLElement, options: IDistanceOptions, bindings: IComponentBindings): DistanceResources

- Overwrites Component.constructor

  - Defined in ui/Distance/DistanceResources.ts :192

  #### Parameters

  - ##### element: HTMLElement

  - ##### options: IDistanceOptions

  - ##### bindings: IComponentBindings

  #### Returns DistanceResources