mirror of
https://github.com/Esri/offline-editor-js.git
synced 2025-12-15 15:20:05 +00:00
update doc
This commit is contained in:
parent
3285f6de61
commit
d2aaa4ad14
@ -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!");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -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()`.
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user