new module:ServiceManager($injector)
Parameters:
Name | Type | Description |
---|---|---|
$injector |
angular.$injector | Main injector. |
Methods
getOfflineService_(serviceLike, method)
Parameters:
Name | Type | Description |
---|---|---|
serviceLike |
string|Object | A service like. |
method |
string | A method. |
Returns:
Object
A returned object.
restore(map)
Ask the provided service to restore the saved data on the map
Parameters:
Name | Type | Description |
---|---|---|
map |
ol.Map | The map to work on. |
Returns:
Promise
A promise to the extent of the downloaded area
save(extent, map)
Ask the provided service to save the data to an offline purpose
Parameters:
Name | Type | Description |
---|---|---|
extent |
ol.Extent | The extent to dowload. |
map |
ol.Map | The map to work on. |
setRestoreService(restoreLikeService)
Set the service to call on 'restore'
Parameters:
Name | Type | Description |
---|---|---|
restoreLikeService |
string|{restore: Function | A service name that can be injected or an object that have a 'restore' method. |
setSaveService(saveLikeService)
Set the service to call on 'save'.
Parameters:
Name | Type | Description |
---|---|---|
saveLikeService |
string|{save: Function | A service name that can be injected or an object that have a 'save' method. |