# Class QueryGridController

#### Hierarchy

- QueryGridController

- Defined in src/query/gridComponent.js:148

#####
Index

### Properties

$element_
$scope_
$timeout_
active
featuresForSources_
features_
filename_
getMapFn
gridSources
highlightFeatures_
loadedGridSources
map_
maxResults
ngeoCsvDownload_
ngeoMapQuerent_
ngeoQueryResult
options
pending
selectedTab
sumOfAvailableResults
sumOfFeatures
tooManyResults
unregisterSelectWatcher_

### Methods

$onInit
cleanProperties_
clear
collectData_
downloadCsv
escapeValue
getActiveGridSource
getGridConfiguration_
getGridSources
getMergedSource_
getMergedSources_
getSelectedRowCount
hasOneWithTooManyResults_
invertSelection
isOneSelected
isSelected
makeGrid_
onSelectionChanged_
reflowGrid_
removeEmptyColumnsFn_
selectAll
selectTab
unselectAll
updateData_
updateFeatures_
zoomToSelection

## Properties

### $element_

$element_: JQuery<HTMLElement>

- Defined in src/query/gridComponent.js:191

### $scope_

$scope_: IScope

- Defined in src/query/gridComponent.js:166

### $timeout_

$timeout_: ITimeoutService

- Defined in src/query/gridComponent.js:171

### active

active: boolean

- Defined in src/query/gridComponent.js:201
- Defined in src/query/gridComponent.js:279
- Defined in src/query/gridComponent.js:351
- Defined in src/query/gridComponent.js:375
- Defined in src/query/gridComponent.js:399
- Defined in src/query/gridComponent.js:724

### featuresForSources_

featuresForSources_: Object

A mapping between row uid and the corresponding feature for each source.

- Defined in src/query/gridComponent.js:233
- Defined in src/query/gridComponent.js:734

### features_

features_: Collection<Feature<Geometry>>

- Defined in src/query/gridComponent.js:240

### filename_

filename_: any

Filename

- Defined in src/query/gridComponent.js:252

### getMapFn

getMapFn: (() => Map)

#### Type declaration

- - (): Map

  - #### Returns Map

- Defined in src/query/gridComponent.js:301

### gridSources

gridSources: Object

- Defined in src/query/gridComponent.js:211
- Defined in src/query/gridComponent.js:727

### highlightFeatures_

highlightFeatures_: Collection<Feature<Geometry>>

- Defined in src/query/gridComponent.js:245

### loadedGridSources

loadedGridSources: string[]

IDs of the grid sources in the order they were loaded.

- Defined in src/query/gridComponent.js:218
- Defined in src/query/gridComponent.js:728

### map_

map_: Map

- Defined in src/query/gridComponent.js:257
- Defined in src/query/gridComponent.js:328

### maxResults

maxResults: number

- Defined in src/query/gridComponent.js:196

### ngeoCsvDownload_

ngeoCsvDownload_: DownloadCsvService

- Defined in src/query/gridComponent.js:186

### ngeoMapQuerent_

ngeoMapQuerent_: MapQuerent

- Defined in src/query/gridComponent.js:181

### ngeoQueryResult

ngeoQueryResult: QueryResult

- Defined in src/query/gridComponent.js:176

### options

options: any

- Defined in src/query/gridComponent.js:161

### pending

pending: boolean

- Defined in src/query/gridComponent.js:206
- Defined in src/query/gridComponent.js:280
- Defined in src/query/gridComponent.js:353
- Defined in src/query/gridComponent.js:377
- Defined in src/query/gridComponent.js:726

### selectedTab

selectedTab: string | number

The id of the currently shown query source.

- Defined in src/query/gridComponent.js:225
- Defined in src/query/gridComponent.js:729
- Defined in src/query/gridComponent.js:747

### sumOfAvailableResults

sumOfAvailableResults: number

Sum over all tabs of the available results

- Defined in src/query/gridComponent.js:271
- Defined in src/query/gridComponent.js:358

### sumOfFeatures

sumOfFeatures: number

Sum over all tabs of the obtained results

- Defined in src/query/gridComponent.js:264
- Defined in src/query/gridComponent.js:359

### tooManyResults

tooManyResults: boolean

- Defined in src/query/gridComponent.js:730

### unregisterSelectWatcher_

unregisterSelectWatcher_: (() => void)

#### Type declaration

- - (): void

  - An unregister function returned from `$scope.$watchCollection` for "on-select" changes (when rows are selected/unselected).

    #### Returns void

- Defined in src/query/gridComponent.js:296
- Defined in src/query/gridComponent.js:751
- Defined in src/query/gridComponent.js:755

## Methods

### $onInit

- $onInit(): void

- Init the controller

  #### Returns void

  - Defined in src/query/gridComponent.js:307

### cleanProperties_

- cleanProperties_(allProperties: Object[], featureGeometriesNames: string[]): void

- Remove all unwanted columns.

  #### Parameters

  - ##### allProperties: Object[]

    A row.

  - ##### featureGeometriesNames: string[]

    Geometry names.

  #### Returns void

  - Defined in src/query/gridComponent.js:600

### clear

- clear(): void

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

  #### Returns void

  - Defined in src/query/gridComponent.js:723

### collectData_

- collectData_(source: QueryResultSource): void

- Collect all features in the queryResult object.

  #### Parameters

  - ##### source: QueryResultSource

    Result source.

  #### Returns void

  - Defined in src/query/gridComponent.js:562

### downloadCsv

- downloadCsv(): void

- Start a CSV download for the selected features.

  #### Returns void

  - Defined in src/query/gridComponent.js:906

### escapeValue

- escapeValue(value: string | number): string | number

- Returns the value with all symbols and spaces replaced by an underscore.

  ### Returns

  value An escaped value.

  #### Parameters

  - ##### value: string | number

    A value to escape.

  #### Returns string | number

  - Defined in src/query/gridComponent.js:428

### getActiveGridSource

- getActiveGridSource(): GridSource

- Get the currently shown grid source.

  ### Returns

  Grid source.

  #### Returns GridSource

  - Defined in src/query/gridComponent.js:711

### getGridConfiguration_

- getGridConfiguration_(data: Object[]): GridConfig

- ### Returns

  Grid config.

  #### Parameters

  - ##### data: Object[]

    Grid rows.

  #### Returns GridConfig

  - Defined in src/query/gridComponent.js:678

### getGridSources

- getGridSources(): GridSource[]

- Returns a list of grid sources in the order they were loaded.

  ### Returns

  Grid sources.

  #### Returns GridSource[]

  - Defined in src/query/gridComponent.js:337

### getMergedSource_

- getMergedSource_(source: QueryResultSource, mergedSources: Object): QueryResultSource

- Check if the given source should be merged. If so, an artificial source that will contain the features of all mergeable sources is returned. If not, `null` is returned.

  ### Returns

  A merged source of null if the source should not be merged.

  #### Parameters

  - ##### source: QueryResultSource

    Source.

  - ##### mergedSources: Object

    Merged sources.

  #### Returns QueryResultSource

  - Defined in src/query/gridComponent.js:492

### getMergedSources_

- getMergedSources_(sources: QueryResultSource[]): QueryResultSource[]

- Try to merge the mergeable sources.

  ### Returns

  The merged sources.

  #### Parameters

  - ##### sources: QueryResultSource[]

    Sources.

  #### Returns QueryResultSource[]

  - Defined in src/query/gridComponent.js:458

### getSelectedRowCount

- getSelectedRowCount(): number

- Returns the number of selected rows of the currently active grid.

  ### Returns

  The number of selected rows.

  #### Returns number

  - Defined in src/query/gridComponent.js:839

### hasOneWithTooManyResults_

- hasOneWithTooManyResults_(): boolean

- ### Returns

  If one of the source has too many results.

  #### Returns boolean

  - Defined in src/query/gridComponent.js:418

### invertSelection

- invertSelection(): void

- Invert the selection of the currently active grid.

  #### Returns void

  - Defined in src/query/gridComponent.js:871

### isOneSelected

- isOneSelected(): boolean

- Returns if a row of the currently active grid is selected?

  ### Returns

  Is one selected?

  #### Returns boolean

  - Defined in src/query/gridComponent.js:825

### isSelected

- isSelected(gridSource: GridSource): boolean

- Returns if the given grid source is selected?

  ### Returns

  Is selected?

  #### Parameters

  - ##### gridSource: GridSource

    Grid source.

  #### Returns boolean

  - Defined in src/query/gridComponent.js:448

### makeGrid_

- makeGrid_(data: Object[], source: QueryResultSource): boolean

- ### Returns

  Returns true if a grid was created.

  #### Parameters

  - ##### data: Object[]

    Grid rows.

  - ##### source: QueryResultSource

    Query source.

  #### Returns boolean

  - Defined in src/query/gridComponent.js:653

### onSelectionChanged_

- onSelectionChanged_(): void

- Called when the row selection has changed.

  #### Returns void

  - Defined in src/query/gridComponent.js:786

### reflowGrid_

- reflowGrid_(): void

- #### Returns void

  - Defined in src/query/gridComponent.js:769

### removeEmptyColumnsFn_

- removeEmptyColumnsFn_(allProperties: Object[]): void

- Remove columns that will be completely empty between each properties.

  #### Parameters

  - ##### allProperties: Object[]

    A row.

  #### Returns void

  - Defined in src/query/gridComponent.js:619

### selectAll

- selectAll(): void

- Select all rows of the currently active grid.

  #### Returns void

  - Defined in src/query/gridComponent.js:851

### selectTab

- selectTab(gridSource: GridSource): void

- Select the tab for the given grid source.

  #### Parameters

  - ##### gridSource: GridSource

    Grid source.

  #### Returns void

  - Defined in src/query/gridComponent.js:745

### unselectAll

- unselectAll(): void

- Deselect all rows of the currently active grid.

  #### Returns void

  - Defined in src/query/gridComponent.js:861

### updateData_

- updateData_(): void

- #### Returns void

  - Defined in src/query/gridComponent.js:341

### updateFeatures_

- updateFeatures_(gridSource: GridSource): void

- #### Parameters

  - ##### gridSource: GridSource

    Grid source

  #### Returns void

  - Defined in src/query/gridComponent.js:798

### zoomToSelection

- zoomToSelection(): void

- Zoom to the selected features.

  #### Returns void

  - Defined in src/query/gridComponent.js:881

Generated using TypeDoc