MapFish Offline core component. This object is a singleton, it can’t be instanciated. This API is inspired by The Dojo Offline Toolkit, created by Dojo, SitePen, and Brad Neuberg.
| mapfish. Offline | MapFish Offline core component. |
| Properties | |
| hasOfflineCache | |
| events | {OpenLayers.Events} An events object that handles all offline events. |
| Functions | |
| goOffline | Manually goes offline, away from the network. |
| goOnline | Attempts to go online. |
| addSyncTask | Informs the component that a sync operation is pending. |
| syncTaskDone | When a synchronizing task created by addSyncTask() is finished, this method must be called with the given identifier. |
{OpenLayers.Events} An events object that handles all offline events.
addSyncTask: function( label )
Informs the component that a sync operation is pending. This method will return a task identifier. You need to call the syncTaskDone() method when the sync operation is finished.
| label | {String} The sync task label. This could be used in a widget to display the sync status. |
{Integer} Sync task identifier. This should be given back to the syncTaskDone() method. Clients shouldn’t try to interpret this returned value.
Manually goes offline, away from the network.
goOffline: function()
Attempts to go online.
goOnline: function()
Informs the component that a sync operation is pending.
addSyncTask: function( label )
When a synchronizing task created by addSyncTask() is finished, this method must be called with the given identifier.
syncTaskDone: function( syncTaskId )