map don't load mpk map. debug it only execute await localMapService.StartAsync(); why?
code:
public async void CreateLocalServiceAndDynamicLayer()
{
try
{
LocalMapService localMapService = new LocalMapService(@"maps\water-distribution-network.mpk");
await localMapService.StartAsync();
ArcGISDynamicMapServiceLayer arcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer()
{
ID = "arcGISDynamicMapServiceLayer",
ServiceUri = localMapService.UrlMapService,
};
MyMapView.Map.Layers.Add(arcGISDynamicMapServiceLayer);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Could you upload your map package?