Select to view content in your preferred language

Unable to select 'Utility Network Sync Mode' when taking network offline

203
3
2 weeks ago
EricLiu
Emerging Contributor

Hi, we are working with the Maui Maps SDK to download the utility network as an offline map. Based on the instructions https://www.esri.com/arcgis-blog/products/utility-network/developers/offline-utility-networks-in-arc... and https://developers.arcgis.com/net/utility-network/take-a-utility-network-offline/

We have a web map created from a feature service. The feature service includes a utility network. We have wrote something like :

var task = await OfflineMapTask.CreateAsync(webmap)
var params = task.CreateDefaultGenerateOfflineMapParametersAsync(areaOfInterest)
var paramsOverride = await task.CreateGenerateOfflineMapParameterOverridesAsync(params);
var overrideKey = new OfflineMapParametersKey(webmap.UtilityNetworks.FirstOrDefault());
paramsOverride.GenerateGeodatabaseParameters[overrideKey].UtilityNetworkSyncMode = UtilityNetworkSyncMode.SystemTablesAndTopology;

var job = task.GenerateOfflineMap(params, storagePath, paramsOverride);

On line 5, we tried setting the different UtilityNetworkSyncModes. On mode 'None', the offline map downloads successfully but it includes the network. On mode 'SystemTables', the offline map (and network) gets downloaded. On mode 'SystemTablesAndTopology', the download fails with error 'Not found: File does not exist in the package'. Setting the mode is not giving the results indicated by the docs.

  • Am I using the wrong approach to select the UtilityNetworkSyncMode before downloading ?
  • Or is it not possible to choose the sync mode when taking a webmap offline and the sync mode is entirely determined by the 'Offline Capabilities for Utility Networks' setting mentioned in the article. 

Could you please point me in the right direction for my task ? Thank you. We are using the 200.5.0 SDK.

 

0 Kudos
3 Replies
EricLiu
Emerging Contributor

Edit: Sorry correction, it seems UtilityNetworkSyncMode.None works in removing the network from the offline map. But UtilityNetworkSyncMode.SyncSystemTablesAndTopology fails

0 Kudos
WilliamMorgenstern
Esri Contributor

Hi Eric,

Thank you for reaching out with your question regarding the inability to select a utility network sync mode.

To resolve this issue, I recommend upgrading to version 200.6 or even 200.7 of the ArcGIS Maps SDKs for Native Apps, which includes enhanced support for offline utility network capabilities, including sync mode options and various bug fixes in the OfflineMapTask.

Additionally, we’ve recently published a new blog post in the series you referenced, which provides detailed guidance on configuring and using offline utility networks with ArcGIS Enterprise 11.3. You can find it here: Offline Utility Networks in ArcGIS Maps SDKs for Native Apps: Part 4.

If you continue to experience issues after upgrading, please don’t hesitate to contact Esri Support for further assistance. We’re here to help ensure your workflows run smoothly.

JenniferNery
Esri Regular Contributor

Just adding to William's suggestion. Should you need to get more information about the GenerateOfflineMapJob and its subjobs, before awaiting for the job's result, you can subscribe and print out messages for the job. It may tell you more where it's failing.

 job.MessageAdded += (s, e) =>
 {
     System.Diagnostics.Debug.WriteLine($"{e.Severity}{e.Message}");
 };

 

When you get this value - you can inspect what the current UtilityNetworkSyncMode, SyncModel, ContinueOnError properties as well before changing it.

var gdbParameters = paramsOverride.GenerateGeodatabaseParameters[overrideKey];