# Class QueryWindowController

#### Hierarchy

- QueryWindowController

- Defined in src/query/windowComponent.js:149

#####
Index

### Properties

animate
collapsed
currentResult
desktop
draggableContainment
element_
feature
features_
filename_
highlightFeatures_
isLoading
isNext
ngeoCsvDownload_
ngeoMapQuerent_
ngeoQueryResult
open
options
selectedSource
source

### Methods

$onInit
animate_
clear
close
collectFeatures_
downloadCSV
getCSVData_
getCSVHeaderDefinition_
getFeatureValues
getResultLength
highlightCurrentFeature_
isFirst
isLast
next
previous
setCurrentResult_
setSelectedSource
show
updateFeatures_
updateQueryResult_

## Properties

### animate

animate: number

- Defined in src/query/windowComponent.js:244

### collapsed

collapsed: boolean

Is the window currently collapsed? When used for Desktop, it is shown non-collapsed.

- Defined in src/query/windowComponent.js:178
- Defined in src/query/windowComponent.js:281

### currentResult

currentResult: number

- Defined in src/query/windowComponent.js:234
- Defined in src/query/windowComponent.js:340
- Defined in src/query/windowComponent.js:523

### desktop

desktop: boolean

- Defined in src/query/windowComponent.js:170

### draggableContainment

draggableContainment: string | Element

- Defined in src/query/windowComponent.js:165
- Defined in src/query/windowComponent.js:283

### element_

element_: JQuery<HTMLElement>

#### Constant

- Defined in src/query/windowComponent.js:254

### feature

feature: Feature<Geometry>

- Defined in src/query/windowComponent.js:229
- Defined in src/query/windowComponent.js:352
- Defined in src/query/windowComponent.js:521

### features_

features_: Collection<Feature<Geometry>>

- Defined in src/query/windowComponent.js:214

### filename_

filename_: any

Filename

- Defined in src/query/windowComponent.js:204

### highlightFeatures_

highlightFeatures_: Collection<Feature<Geometry>>

- Defined in src/query/windowComponent.js:219

### isLoading

isLoading: boolean

- Defined in src/query/windowComponent.js:259
- Defined in src/query/windowComponent.js:264

### isNext

isNext: boolean

- Defined in src/query/windowComponent.js:239
- Defined in src/query/windowComponent.js:466

### ngeoCsvDownload_

ngeoCsvDownload_: DownloadCsvService

- Defined in src/query/windowComponent.js:197

### ngeoMapQuerent_

ngeoMapQuerent_: MapQuerent

- Defined in src/query/windowComponent.js:192

### ngeoQueryResult

ngeoQueryResult: QueryResult

- Defined in src/query/windowComponent.js:183

### open

open: boolean

- Defined in src/query/windowComponent.js:249
- Defined in src/query/windowComponent.js:269
- Defined in src/query/windowComponent.js:322
- Defined in src/query/windowComponent.js:511

### options

options: any

- Defined in src/query/windowComponent.js:160

### selectedSource

selectedSource: QueryResultSource

- Defined in src/query/windowComponent.js:209
- Defined in src/query/windowComponent.js:526
- Defined in src/query/windowComponent.js:538

### source

source: QueryResultSource

- Defined in src/query/windowComponent.js:224
- Defined in src/query/windowComponent.js:351
- Defined in src/query/windowComponent.js:522

## Methods

### $onInit

- $onInit(): void

- Initialize the controller.

  #### Returns void

  - Defined in src/query/windowComponent.js:279

### animate_

- animate_(isNext): void

- Special function that's used to set the "animation" value after to set the "isNext" value. The aim is to wait on Angular to add a class (corresponding to "isNext") on the DOM before to set the "animation" value and do the animation.

  #### Parameters

  - ##### isNext: boolean

    used to indicate if the user wants to see the next or the previous result.

  #### Returns void

  - Defined in src/query/windowComponent.js:465

### clear

- clear(): void

- Remove the current selected feature and source and remove all features from the map.

  #### Returns void

  - Defined in src/query/windowComponent.js:520

### close

- close(): void

- Remove the current selected feature and source and remove all features from the map.

  #### Returns void

  - Defined in src/query/windowComponent.js:510

### collectFeatures_

- collectFeatures_(): void

- Collect all features in the queryResult object.

  #### Returns void

  - Defined in src/query/windowComponent.js:473

### downloadCSV

- downloadCSV(source): void

- Download a CSV with features of the given source.

  #### Parameters

  - ##### source: QueryResultSource

    The source to export as csv.

  #### Returns void

  - Defined in src/query/windowComponent.js:547

### getCSVData_

- getCSVData_(source): Object[]

- #### Parameters

  - ##### source: QueryResultSource

    The source to export as csv.

  #### Returns Object[]

  data.

  - Defined in src/query/windowComponent.js:559

### getCSVHeaderDefinition_

- getCSVHeaderDefinition_(data): any[]

- #### Parameters

  - ##### data: Object[]

    where keys with at least one defined value will be used as csv column header.

  #### Returns any[]

  columns definitions for the CSV.

  - Defined in src/query/windowComponent.js:573

### getFeatureValues

- getFeatureValues(): Object

- Delete the unwanted ol3 properties from the current feature then return the properties.

  #### Returns Object

  Filtered properties of the current feature or null.

  - Defined in src/query/windowComponent.js:449

### getResultLength

- getResultLength(): number

- Get the total count of features in the result of the query. If a source has been select, only the number of features of that source are returned.

  #### Returns number

  Total number of features.

  - Defined in src/query/windowComponent.js:421

### highlightCurrentFeature_

- highlightCurrentFeature_(opt_lastFeature?): void

- Highlight the current displayed feature.

  #### Parameters

  - ##### `Optional` opt_lastFeature: Feature<Geometry>

    last highlighted feature. Require if it exists because it must be added to the 'non-selected' features collection.

  #### Returns void

  - Defined in src/query/windowComponent.js:494

### isFirst

- isFirst(): boolean

- #### Returns boolean

  If the first result is active.

  - Defined in src/query/windowComponent.js:432

### isLast

- isLast(): boolean

- #### Returns boolean

  If the last result is active.

  - Defined in src/query/windowComponent.js:439

### next

- next(): void

- Select the logical next source and feature then highlight this feature on the map.

  #### Returns void

  - Defined in src/query/windowComponent.js:383

### previous

- previous(): void

- Select the logical previous source and feature then highlight this feature on the map.

  #### Returns void

  - Defined in src/query/windowComponent.js:368

### setCurrentResult_

- setCurrentResult_(position, setHighlight): boolean

- Select a source and a feature depending of the given position.

  #### Parameters

  - ##### position: number

    The index of the feature. If the position is bigger than the length of the first source, get it in the next source. Etc.

  - ##### setHighlight: boolean

    True to set the highlight automatically.

  #### Returns boolean

  True if result has changed. False else.

  - Defined in src/query/windowComponent.js:334

### setSelectedSource

- setSelectedSource(source): void

- #### Parameters

  - ##### source: QueryResultSource

    The source to select.

  #### Returns void

  - Defined in src/query/windowComponent.js:532

### show

- show(): void

- Remove current displayed results then get new results from the ngeoQueryResult service. Display all results on the map and display, highlight the first feature.

  #### Returns void

  - Defined in src/query/windowComponent.js:312

### updateFeatures_

- updateFeatures_(): void

- #### Returns void

  - Defined in src/query/windowComponent.js:317

### updateQueryResult_

- updateQueryResult_(queryResult): void

- Remove features without properties from the query result.

  #### Parameters

  - ##### queryResult: QueryResult

    ngeo query result.

  #### Returns void

  - Defined in src/query/windowComponent.js:400

Generated using TypeDoc