JerrySimmons

Sync Offline Map Package issue

Discussion created by JerrySimmons on Nov 8, 2017
Latest reply on Nov 29, 2017 by JerrySimmons

I have an application that references a AGOL web map - I'm able to load the web map in the map view, I'm able to download a map package and reference the downloaded map in the map view, I'm able to add new feature to the downloaded map.  Issue is when I sync using OfflineMapSyncTask the job comes back as successful but I get error on the server side stating "the spatial references do not match".  It appears that the map package that was downloaded and is in a different spatial reference than the feature service in web map service.  

 

When testing the downloading using GeodatabaseSyncTask I ran into the same issue, however, there was an option to specify the OutSpatialReference in the GenerateGeodatabaseParameters constructor. 

 

Does this functionality exist, should it be possible to sync a map package to the web map it was downloaded from after adding features?  

 

FYI - I contacted ESRI support and at this point I was asked to re-project my data to resolve the issue. This is not an option.

 

OfflineMapSyncTask task = await OfflineMapSyncTask.CreateAsync(_mapView.Map);
OfflineMapSyncParameters para = new OfflineMapSyncParameters()
{
SyncDirection = SyncDirection.Bidirectional,
RollbackOnFailure = true
};

OfflineMapSyncJob job = task.SyncOfflineMap(para);
job.JobChanged += (s, e) =>
{
if (job.Status == Esri.ArcGISRuntime.Tasks.JobStatus.Succeeded)
{
InvokeOnMainThread(() =>
{
genericAlert("Off Line Map Package", "Synchronization is complete!");
});
}
else if (job.Status == Esri.ArcGISRuntime.Tasks.JobStatus.Failed)
{
InvokeOnMainThread(() =>
{
genericAlert("Off Line Map Package", "Synchronization failed: ");
});
}
else
{
InvokeOnMainThread(() =>
{
string statusMessage = "Sync in progress ...";
});
}
};

Outcomes