# Class Controller

- Defined in src/offline/component.js:106
- Defined in src/offline/component.js:570

#####
Index

### Constructors

constructor

### Properties

displayAlertAbortDownload
displayAlertLoadData
displayAlertNoLayer
downloading
estimatedLoadDataSize
extentSize
map
maskMargin
maxZoom
menuDisplayed
minZoom
networkStatus
offlineMode
originalMaxZoom
originalMinZoom
progressPercents
rotateMask
selectingExtent
$inject

### Methods

$onDestroy
$onInit
abortDownload
activateOfflineMode
askAbortDownload
computeSizeAndDisplayAlertLoadData
deactivateOfflineMode
deleteData
getExtentSize_
hasData
isExtentVisible
showMenu
toggleExtentVisibility
toggleViewExtentSelection
validateExtent

##
Constructors

### constructor

- new Controller($timeout, ngeoOfflineServiceManager, ngeoOfflineConfiguration, ngeoOfflineMode, ngeoNetworkStatus): Controller

- #### Parameters

  - $timeout: ITimeoutService

    Angular timeout service.

  - ngeoOfflineServiceManager: default

    ngeo offline service Manager.

  - ngeoOfflineConfiguration: default

    ngeo offline configuration service.

  - ngeoOfflineMode: default

    Offline mode manager.

  - ngeoNetworkStatus: Service

    ngeo network status service.

  #### Returns Controller

  #### Ngdoc

  controller

  #### Ngname

  ngeoOfflineController

  - Defined in src/offline/component.js:118

##
Properties

### displayAlertAbortDownload

displayAlertAbortDownload: boolean

Whether the cancel download modal is displayed.

#### Export

- Defined in src/offline/component.js:233
- Defined in src/offline/component.js:404

### displayAlertLoadData

displayAlertLoadData: boolean

Whether the load data modal is displayed.

#### Export

- Defined in src/offline/component.js:241
- Defined in src/offline/component.js:355

### displayAlertNoLayer

displayAlertNoLayer: boolean

Whether the "no layer" modal is displayed.

#### Export

- Defined in src/offline/component.js:249
- Defined in src/offline/component.js:357

### downloading

downloading: boolean

Whether the current view is downloading one.

#### Export

- Defined in src/offline/component.js:209
- Defined in src/offline/component.js:386
- Defined in src/offline/component.js:394
- Defined in src/offline/component.js:413

### estimatedLoadDataSize

estimatedLoadDataSize: number

#### Export

- Defined in src/offline/component.js:295
- Defined in src/offline/component.js:353

### extentSize

extentSize: number

The size, in map units, of a side of the extent.

#### Export

- Defined in src/offline/component.js:174

### map

map: Map

The map.

#### Export

- Defined in src/offline/component.js:166

### maskMargin

maskMargin: number

Offline mask minimum margin in pixels.

#### Export

- Defined in src/offline/component.js:257
- Defined in src/offline/component.js:321

### maxZoom

maxZoom: number

Maximum zoom where offline is enable.

#### Export

- Defined in src/offline/component.js:273
- Defined in src/offline/component.js:323

### menuDisplayed

menuDisplayed: boolean

Whether the menu is currently displayed.

#### Export

- Defined in src/offline/component.js:225
- Defined in src/offline/component.js:367
- Defined in src/offline/component.js:424
- Defined in src/offline/component.js:443
- Defined in src/offline/component.js:490

### minZoom

minZoom: number

Minimum zoom where offline is enable.

#### Export

- Defined in src/offline/component.js:265
- Defined in src/offline/component.js:322

### networkStatus

networkStatus: Service

#### Export

- Defined in src/offline/component.js:158

### offlineMode

offlineMode: default

#### Export

- Defined in src/offline/component.js:152

### originalMaxZoom

originalMaxZoom: number

Map view min zoom constraint.

#### Export

- Defined in src/offline/component.js:289
- Defined in src/offline/component.js:520

### originalMinZoom

originalMinZoom: number

Map view max zoom constraint.

#### Export

- Defined in src/offline/component.js:281
- Defined in src/offline/component.js:519

### progressPercents

progressPercents: number

The progression of the data loading (0-100%).

#### Export

- Defined in src/offline/component.js:217
- Defined in src/offline/component.js:308
- Defined in src/offline/component.js:384

### rotateMask

rotateMask: boolean

- Defined in src/offline/component.js:300

### selectingExtent

selectingExtent: boolean

Whether the current view is the extent selection.

#### Export

- Defined in src/offline/component.js:201
- Defined in src/offline/component.js:368

### `Static`$inject

$inject: string[]

- Defined in src/offline/component.js:570

##
Methods

### $onDestroy

- $onDestroy(): void

- #### Returns void

  - Defined in src/offline/component.js:334

### $onInit

- $onInit(): void

- #### Returns void

  - Defined in src/offline/component.js:315

### abortDownload

- abortDownload(): void

- Abort the download of data.

  #### Returns void

  #### Export

  - Defined in src/offline/component.js:412

### activateOfflineMode

- activateOfflineMode(): void

- Activate offline mode. Zoom to the extent of that data and restore the data.

  #### Returns void

  #### Export

  - Defined in src/offline/component.js:433

### askAbortDownload

- askAbortDownload(): void

- Ask to abort the download of data.

  #### Returns void

  #### Export

  - Defined in src/offline/component.js:403

### computeSizeAndDisplayAlertLoadData

- computeSizeAndDisplayAlertLoadData(): void

- #### Returns void

  #### Export

  - Defined in src/offline/component.js:352

### deactivateOfflineMode

- deactivateOfflineMode(): void

- Deactivate offline mode. Reload the page.

  #### Returns void

  #### Export

  - Defined in src/offline/component.js:456

### deleteData

- deleteData(): void

- Delete the saved data.

  #### Returns void

  #### Export

  - Defined in src/offline/component.js:486

### getExtentSize_

- getExtentSize_(): number

- #### Returns number

  - Defined in src/offline/component.js:563

### hasData

- hasData(): boolean

- #### Returns boolean

  True if data are accessible offline.

  #### Export

  - Defined in src/offline/component.js:345

### isExtentVisible

- isExtentVisible(): boolean

- #### Returns boolean

  True if the extent is currently visible. False otherwise.

  #### Export

  - Defined in src/offline/component.js:477

### showMenu

- showMenu(): void

- Show the main menu.

  #### Returns void

  #### Export

  - Defined in src/offline/component.js:423

### toggleExtentVisibility

- toggleExtentVisibility(): void

- Toggle the visibility of the data's extent.

  #### Returns void

  #### Export

  - Defined in src/offline/component.js:465

### toggleViewExtentSelection

- toggleViewExtentSelection(finished?): void

- Toggle the selecting extent view.

  #### Parameters

  - `Optional` finished: boolean

    If just finished downloading.

  #### Returns void

  #### Export

  - Defined in src/offline/component.js:366

### validateExtent

- validateExtent(): void

- Validate the current extent and download data.

  #### Returns void

  #### Export

  - Defined in src/offline/component.js:383