Take a utility network offline

Starting with version 100.11, you can take certain information . , which are used to describe containment, structural attachment, and connection between features with non-coincident geometry, can be queried and displayed with . Simple edits can also be made to utility network features while offline and synchronized back to .

The following code takes a web map offline that contains a utility network. The utility network tables are automatically synced with a map when a utility network is detected within.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
var task = await OfflineMapTask.CreateAsync(map);
var offlineMapParameters = await task.CreateDefaultGenerateOfflineMapParametersAsync(areaOfInterest);

var job = task.GenerateOfflineMap(offlineMapParameters, downloadDirectoryPath);
var result = await job.GetResultAsync();

var utilityNetwork = result.OfflineMap.UtilityNetworks[0];
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
var parametersOverride = await task.CreateGenerateOfflineMapParameterOverridesAsync(offlineMapParameters);

var overrideKey = new OfflineMapParametersKey(map.UtilityNetworks[0]);
var geodatabaseParameters = parametersOverride.GenerateGeodatabaseParameters[overrideKey];
geodatabaseParameters.UtilityNetworkSyncMode = UtilityNetworkSyncMode.None;

The following code generates a sync-enabled mobile geodatabase from a feature service. By default, only feature data are included unless you specify a sync mode for the utility network.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
var task = await GeodatabaseSyncTask.CreateAsync(featureServiceUri);
var parameters = await task.CreateDefaultGenerateGeodatabaseParametersAsync(areaOfInterest);

// Specify a sync mode for utility network
parameters.UtilityNetworkSyncMode = UtilityNetworkSyncMode.SyncSystemTables;

var job = task.GenerateGeodatabase(parameters, pathToGeodatabaseFile);
var geodatabase = await job.GetResultAsync();

For more information about offline workflows using ArcGIS Maps SDKs for Native Apps, see the Offline maps, scenes, and data topic.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close