我正在离线添加功能到功能服务。我的要素服务是可编辑的。我创建了一个地理数据库并向其中添加了一个功能。我可以看到我在地理数据库中添加的功能。但是,当我将地理数据库与要素服务同步时,出现“”错误。错误不只是“”;
代码如下;
GeodatabaseSyncTask syncTask = await GeodatabaseSyncTask.CreateAsync(featureServiceUri);
// Create sync parameters
SyncGeodatabaseParameters taskParameters = await syncTask.CreateDefaultSyncGeodatabaseParametersAsync(geodatabase);
// Create a synchronize geodatabase job, pass in the parameters and the geodatabase
SyncGeodatabaseJob job = syncTask.SyncGeodatabase(taskParameters, geodatabase);
MessageBox.Show(job.Status.ToString());
job.Start();
MessageBox.Show(job.Status.ToString());
job.JobChanged += (s, arg) =>
{
// Report changes in the job status
if (job.Status == JobStatus.Succeeded)
{
// Report success ...
MessageBox.Show("Synchronization is complete!");
}
else if (job.Status == JobStatus.Failed)
{
// Report failure ...
MessageBox.Show(job.Error.Message);
}
else
{
// Report that the job is in progress ...
MessageBox.Show("Sync in progress ...");
}
};
// await the completion of the job
await job.GetResultAsync();
我在线上遇到错误 await job.GetResultAsyn();
。
我究竟做错了什么?