public async Task ImportRawGeoJSON(string contents) { try { int successfulImports = await FeatureStore.ImportRawContents(contents); await NavigationService.ShowImportAlert(successfulImports); } catch (Exception ex) { await NavigationService.ShowAlert("Import Error", ex.Message, false); } }
public async void UndoDelete() { bool result = await NavigationService.GetCurrentPage().DisplayAlert("Undo Delete", "", "Undo", "Cancel"); if (result) { string contents = File.ReadAllText(Constants.DELETED_FEATURE_FILE); try { _ = await FeatureStore.ImportRawContents(contents); } catch (Exception ex) { await NavigationService.ShowAlert("Recovery Error", ex.Message, false); } } }