update doc

This commit is contained in:
Andy Gup 2015-04-29 19:15:26 -06:00
parent 3285f6de61
commit d2aaa4ad14
2 changed files with 8 additions and 1 deletions

View File

@ -111,13 +111,19 @@ You can then retrieve this data after an offline restart by using the following
```js
featureLayer.getFeatureLayerJSONDataStore(function(success, dataStore){
offlineFeaturesManager.getFeatureLayerJSONDataStore(function(success, dataStore){
if(success){
myFeatureLayer = new
FeatureLayer(JSON.parse(dataStore.featureLayerCollection),{
mode: FeatureLayer.MODE_SNAPSHOT,
outFields: ["GlobalID","BSID","ROUTES","STOPNAME"]
});
offlineFeaturesManager.extend(myFeatureLayer,function(result, error) {
if(result) {
console.log("Layer has been successfully rebuilt while offline!");
}
}
}
});

View File

@ -42,6 +42,7 @@ Methods | Returns | Description
`goOffline()` | nothing | Forces library into an offline state. Any edits applied to extended FeatureLayers during this condition will be stored locally.
`goOnline(callback)` | `callback( boolean, results )` | Forces library to return to an online state. If there are pending edits, an attempt will be made to sync them with the remote feature server. Callback function will be called when resync process is done. <br><br>Refer to the [How to use the edit library doc](howtouseeditlibrary.md) for addition information on the `results` object.
`getOnlineStatus()` | `ONLINE`, `OFFLINE` or `RECONNECTING`| Determines the current state of the manager. Please, note that this library doesn't detect actual browser offline/online condition. You need to use the `offline.min.js` library included in `vendor\offline` directory to detect connection status and connect events to goOffline() and goOnline() methods. See `military-offline.html` sample.
`getFeatureLayerJSONDataStore` | `callback( boolean, Object)` | **New @ v2.7.1** Returns the feature layer's dataStore Object.
`getReadableEdit()` | String | **DEPRECATED** @ v2.5. A string value representing human readable information on pending edits. Use `featureLayer.getAllEditsArray()`.