mirror of
https://github.com/Esri/offline-editor-js.git
synced 2025-12-15 15:20:05 +00:00
basic goOffline func working
This commit is contained in:
parent
4f5bb65262
commit
f3cc5b7bda
@ -294,15 +294,27 @@
|
||||
*/
|
||||
|
||||
function goOnline(){
|
||||
console.log("Online");
|
||||
console.log("Going online...");
|
||||
offlineFeaturesManager.goOnline(function(success,error){
|
||||
if(error === undefined){
|
||||
btnOnlineOffline.innerHTML = "2. Go Offline";
|
||||
imgOfflineIndicator.src = bluePinPath;
|
||||
console.log("offlineFeatureManager is online.");
|
||||
}
|
||||
else{
|
||||
alert("There was a problem syncing offline edits: " + JSON.stringify(error));
|
||||
}
|
||||
});
|
||||
|
||||
updateOfflineUsage();
|
||||
if(typeof baseMapLayer != "undefined") baseMapLayer.goOnline();
|
||||
}
|
||||
|
||||
function goOffline(){
|
||||
console.log("Going offline...");
|
||||
btnOnlineOffline.innerHTML = "2. Go Online";
|
||||
imgOfflineIndicator.src = redPinPath;
|
||||
imgOfflineIndicator.offlineColor = "red";
|
||||
// offlineFeaturesManager.goOffline();
|
||||
offlineFeaturesManager.goOffline();
|
||||
if(typeof tileLayer != "undefined") tileLayer.goOffline();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user