mapfish. Offline

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.

Summary
mapfish. OfflineMapFish Offline core component.
Properties
hasOfflineCache
events{OpenLayers.Events} An events object that handles all offline events.
Functions
goOfflineManually goes offline, away from the network.
goOnlineAttempts to go online.
addSyncTaskInforms the component that a sync operation is pending.
syncTaskDoneWhen a synchronizing task created by addSyncTask() is finished, this method must be called with the given identifier.

Properties

hasOfflineCache

{Boolean}Determines if an offline cache is available or installed.

events

{OpenLayers.Events} An events object that handles all offline events.

Functions

goOffline

goOffline: function()

Manually goes offline, away from the network.

goOnline

goOnline: function()

Attempts to go online.

addSyncTask

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.

Parameters

label{String} The sync task label.  This could be used in a widget to display the sync status.

Returns

{Integer} Sync task identifier.  This should be given back to the syncTaskDone() method.  Clients shouldn’t try to interpret this returned value.

syncTaskDone

syncTaskDone: function(syncTaskId)

When a synchronizing task created by addSyncTask() is finished, this method must be called with the given identifier.

Parameters

syncTaskId{Integer} synchronization task identifier, as returned by the addSyncTask() method.
goOffline: function()
Manually goes offline, away from the network.
goOnline: function()
Attempts to go online.
addSyncTask: function(label)
Informs the component that a sync operation is pending.
syncTaskDone: function(syncTaskId)
When a synchronizing task created by addSyncTask() is finished, this method must be called with the given identifier.
Close