Hi, I have learned from tutorials to load sample "PointsofInterest.mpkx" in arcgis runtime 100.10. Now I have created my own sample map in arcgis pro which uses satellite imagery. I exported that map named "newdha2map.mpkx" after enabling support for arcgis runtime.
However, I encounter this exception each time after running the application.
Please help.
Exception:
{"Failed to create service newdha2map MapServer. Service failed to initialize: Error unpacking map package hr=0x80004005 (No ErrorInfo)"}
Source Code:
Map = new Map(BasemapStyle.ArcGISTopographic);
// Create a local map service from a map package on disk.
LocalMapService pointsOfInterestMapService = new LocalMapService(@"..\Data\newDHA2Map.mpkx");
try
{
// Start the local service.
await pointsOfInterestMapService.StartAsync();
}
catch (InvalidOperationException invalidOpEx)
{
// Thrown if LocalService is already in Started state.
// TODO
}
catch (LocalServerException localServerEx)
{
// Thrown if deployment license level does not meet minimum required.
// TODO
}
catch (Exception ex)
{
// Thrown if error encountered starting service.
// TODO
}
// If the service did not start handle error and return.
if (pointsOfInterestMapService.Error != null || pointsOfInterestMapService.Status != LocalServerStatus.Started)
{
// TODO
return;
}
// Create a new ArcGISMapImageLayer.
ArcGISMapImageLayer pointsOfInterestmapImageLayer = new ArcGISMapImageLayer(pointsOfInterestMapService.Url);
// Add the layer to the map.
Map.OperationalLayers.Add(pointsOfInterestmapImageLayer);
Map download Link (gdrive):
https://drive.google.com/file/d/1Gyik5MDD4SIXf6Ic2y5z2kztx9u1wG9D/view?usp=sharing