I am trying to load a local map package to the main window using ArcGIS Runtime .Net for WPF (Version 100.1). But somehow the local server cannot find layers in the map package. Here's my script:
public MainWindow()
{
InitializeComponent();
StartLocalServer();
}
private Esri.ArcGISRuntime.LocalServices.LocalServer _localServer;
private async void StartLocalServer()
{
_localServer = Esri.ArcGISRuntime.LocalServices.LocalServer.Instance;
await _localServer.StartAsync();
var mapService = new Esri.ArcGISRuntime.LocalServices.LocalMapService(@"C:\mappackage.mpk");
await mapService.StartAsync();
var mapServiceUrl = mapService.Url;
}
I checked the generated url of the local service and not a single layer in that map package was found. See the screenshot here: screenshot of local service The map package was created in ArcMap 10.5 with Runtime support enabled. It contains 2 point layers, 2 polyline layers, and 1 polygon layer.
Any help would be appreciated! Thank you!
v100.1's local server doesn't support MMPKs created with 10.5. You need 10.5.1 to create packages compatible with the 100.1 local server.
From https://developers.arcgis.com/net/latest/wpf/guide/system-requirements.htm: