Select to view content in your preferred language

Offline Routing on Local Data

216
2
Jump to solution
09-05-2024 04:41 AM
Labels (1)
T_SivaReddy
Emerging Contributor

Hi Team,

Created the Network Dataset in Mobile Geodatabase. When preforming offline Route task in Map SDK .NET, it displays a not open file error. But it works in ArcGIS Pro when performing Routing.

_offlineRouteTask = await RouteTask.CreateAsync(networkGeodatabasePath, "Streets_ND");

Error:

T_SivaReddy_0-1725536174917.png

 

Please help on this.

 

 

 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

Hi,

You need to use mobile map package (mmpk) for local routing:

 

MobileMapPackage mobileMap = new MobileMapPackage(packageUrl);
await mobileMap.LoadAsync();

// determine if map supports routing
if (mobileMap.Maps.Count > 0 && mobileMap.Maps[0].TransportationNetworks.Count > 0)
{
    _routeTask = await RouteTask.CreateAsync(mobileMap.Maps[0].TransportationNetworks[0]);
}

 

Check indexes of maps and transportation networks according to your data

View solution in original post

2 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

You need to use mobile map package (mmpk) for local routing:

 

MobileMapPackage mobileMap = new MobileMapPackage(packageUrl);
await mobileMap.LoadAsync();

// determine if map supports routing
if (mobileMap.Maps.Count > 0 && mobileMap.Maps[0].TransportationNetworks.Count > 0)
{
    _routeTask = await RouteTask.CreateAsync(mobileMap.Maps[0].TransportationNetworks[0]);
}

 

Check indexes of maps and transportation networks according to your data

T_SivaReddy
Emerging Contributor

Thanks 

0 Kudos