implements {import('ngeo/offline/index').OfflineOnTileDownload}

### Hierarchy

- olObservable
  - default

## Index

### Constructors

- constructor

### Properties

- localforage_

### Methods

- clear
- configureLocalforage
- createLayerMetadatas
- createLocalforage
- estimateLoadDataSize
- getExtentByZoom
- getItem
- getLayerKey
- getMaxNumberOfParallelDownloads
- hasOfflineData
- onTileDownloadError
- onTileDownloadSuccess
- recreateOfflineLayer
- removeItem
- setHasOfflineData
- setItem
- traceGetSetItem

## Constructors

### constructor

- new default($rootScope: IScope, ngeoBackgroundLayerMgr: MapBackgroundLayerManager, ngeoOfflineGutter: number): default

- Overrides olObservable.constructor

  - Defined in src/offline/Configuration.js:52
  nginject

  #### Parameters

  - ##### $rootScope: IScope

    The rootScope provider.

  - ##### ngeoBackgroundLayerMgr: MapBackgroundLayerManager

    Background layer manager.

  - ##### ngeoOfflineGutter: number

    A gutter around the tiles to download (to avoid cut symbols)

  #### Returns default

## Properties

### localforage_

localforage_: any

- Defined in src/offline/Configuration.js:55

## Methods

### clear

- clear(): Promise<void>

- - Defined in src/offline/Configuration.js:194

  #### Returns Promise<void>

  A promise

### configureLocalforage

- configureLocalforage(): void

- - Defined in src/offline/Configuration.js:155

  #### Returns void

### createLayerMetadatas

- createLayerMetadatas(map: Map, userExtent: Extent): OfflineLayerMetadata[]

- - Defined in src/offline/Configuration.js:299

  #### Parameters

  - ##### map: Map

    The map to work on.

  - ##### userExtent: Extent

    The extent selected by the user.

  #### Returns OfflineLayerMetadata[]

  the downloadable layers and metadata.

### createLocalforage

- createLocalforage(): any

- - Defined in src/offline/Configuration.js:141

  #### Returns any

### estimateLoadDataSize

- estimateLoadDataSize(map: Map): number

- - Defined in src/offline/Configuration.js:204

  #### Parameters

  - ##### map: Map

    A map

  #### Returns number

  An "estimation" of the size of the data to download

### getExtentByZoom

- getExtentByZoom(map: Map, layer: Layer<Source, any>, ancestors: LayerGroup[], userExtent: Extent): OfflineExtentByZoom[]

- - Defined in src/offline/Configuration.js:246

  #### Parameters

  - ##### map: Map

    A map

  - ##### layer: Layer<Source, any>

    A layer

  - ##### ancestors: LayerGroup[]

    The ancestors of that layer

  - ##### userExtent: Extent

    The extent selected by the user.

  #### Returns OfflineExtentByZoom[]

  The extent to download per zoom level

### getItem

- getItem(key: string): Promise<any>

- - Defined in src/offline/Configuration.js:167

  #### Parameters

  - ##### key: string

    The key

  #### Returns Promise<any>

  A promise

### getLayerKey

- getLayerKey(layerItem: OfflineLayerMetadata): string

- - Defined in src/offline/Configuration.js:212

  #### Parameters

  - ##### layerItem: OfflineLayerMetadata

    The layer metadata

  #### Returns string

  A key identifying an offline layer and used during restore.

### getMaxNumberOfParallelDownloads

- getMaxNumberOfParallelDownloads(): number

- - Defined in src/offline/Configuration.js:397

  #### Returns number

  The number

### hasOfflineData

- hasOfflineData(): boolean

- - Defined in src/offline/Configuration.js:114
  export

  #### Returns boolean

  whether some offline data is available in the storage

### onTileDownloadError

- onTileDownloadError(progress: number): Promise<void>

- - Defined in src/offline/Configuration.js:234

  #### Parameters

  - ##### progress: number

    The progress

  #### Returns Promise<void>

  A promise

### onTileDownloadSuccess

- onTileDownloadSuccess(progress: number, tile: OfflineTile): Promise<void>

- - Defined in src/offline/Configuration.js:221

  #### Parameters

  - ##### progress: number

    The download progress

  - ##### tile: OfflineTile

    The tile

  #### Returns Promise<void>

  A promise

### recreateOfflineLayer

- recreateOfflineLayer(offlineLayer: OfflinePersistentLayer): Layer<Source, any>

- - Defined in src/offline/Configuration.js:381

  #### Parameters

  - ##### offlineLayer: OfflinePersistentLayer

    The layer to recreate

  #### Returns Layer<Source, any>

  the layer.

### removeItem

- removeItem(key: string): Promise<any>

- - Defined in src/offline/Configuration.js:176

  #### Parameters

  - ##### key: string

    .

  #### Returns Promise<any>

  .

### setHasOfflineData

- setHasOfflineData(value: boolean): void

- - Defined in src/offline/Configuration.js:121

  #### Parameters

  - ##### value: boolean

    whether there is offline data available in the storage.

  #### Returns void

### setItem

- setItem(key: string, value: any): Promise<any>

- - Defined in src/offline/Configuration.js:186

  #### Parameters

  - ##### key: string

    The key

  - ##### value: any

    A value

  #### Returns Promise<any>

  A promise

### traceGetSetItem

- traceGetSetItem(msg: string, key: string, promise: Promise<any>): Promise<any>

- - Defined in src/offline/Configuration.js:137

  Hook to allow measuring get/set item performance.

  #### Parameters

  - ##### msg: string

    A message

  - ##### key: string

    The key to work on

  - ##### promise: Promise<any>

    A promise

  #### Returns Promise<any>

  The promise we passed

Generated using TypeDoc