new module:Configuration($rootScope, ngeoBackgroundLayerMgr, ngeoOfflineGutter)
Parameters:
Name | Type | Description |
---|---|---|
$rootScope |
!angular.Scope | The rootScope provider. |
ngeoBackgroundLayerMgr |
ngeo.map.BackgroundLayerMgr | The background layer manager |
ngeoOfflineGutter |
number | A gutter around the tiles to download (to avoid cut symbols) |
- Implements:
- ngeox.OfflineOnTileDownload
Members
(protected) hasData: boolean
Methods
clear()
Returns:
A promise
createLayerMetadatas(map, userExtent)
Parameters:
Name | Type | Description |
---|---|---|
map |
ol.Map | The map to work on. |
userExtent |
ol.Extent | The extent selected by the user. |
Returns:
the downloadable layers and metadata.
estimateLoadDataSize(map)
Parameters:
Name | Type | Description |
---|---|---|
map |
!ol.Map | A map |
Returns:
An "estimation" of the size of the data to download
getExtentByZoom(map, layer, ancestors, userExtent)
Parameters:
Name | Type | Description |
---|---|---|
map |
ol.Map | A map |
layer |
ol.layer.Layer | A layer |
ancestors |
Array |
The ancestors of that layer |
userExtent |
ol.Extent | The extent selected by the user. |
Returns:
The extent to download per zoom level
getItem(key)
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The key |
Returns:
A promise
getLayerKey(layerItem)
Parameters:
Name | Type | Description |
---|---|---|
layerItem |
ngeox.OfflineLayerMetadata | The layer metadata |
Returns:
A key identifying an offline layer and used during restore.
getMaxNumberOfParallelDownloads()
Returns:
The number
hasOfflineData()
Returns:
whether some offline data is available in the storage
(protected) initializeHasOfflineData()
onTileDownloadError(progress)
Parameters:
Name | Type | Description |
---|---|---|
progress |
number | The progress |
Returns:
A promise
onTileDownloadSuccess(progress, tile)
Parameters:
Name | Type | Description |
---|---|---|
progress |
number | The download progress |
tile |
ngeox.OfflineTile | The tile |
Returns:
A promise
recreateOfflineLayer(offlineLayer)
Parameters:
Name | Type | Description |
---|---|---|
offlineLayer |
ngeox.OfflinePersistentLayer | The layer to recreate |
Returns:
the layer.
removeItem(key)
Parameters:
Name | Type | Description |
---|---|---|
key |
string | . |
Returns:
.
setHasOfflineData(value)
Parameters:
Name | Type | Description |
---|---|---|
value |
boolean | whether there is offline data available in the storage. |
setItem(key, value)
Parameters:
Name | Type | Description |
---|---|---|
key |
string | The key |
value |
* | A value |
Returns:
A promise
(protected) sourceImageWMSToTileWMS(source, projection)
Parameters:
Name | Type | Description |
---|---|---|
source |
ol.source.Source | An ImageWMS source |
projection |
ol.proj.Projection | The projection |
Returns:
A tiled equivalent source
traceGetSetItem(msg, key, promise)
Hook to allow measuring get/set item performance.
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | A message |
key |
string | The key to work on |
promise |
Promise> | A promise |
Returns:
The promise we passed