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:
Please help on this.
Solved! Go to Solution.
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
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
Thanks