0

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!

TTTZ
  • 11
  • 1

2 Answers2

2

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:

  • ArcGIS Pro: To create mobile map packages for use in your ArcGIS Runtime apps use ArcGIS Pro 1.3 or higher.
  • ArcGIS Desktop: To create geoprocessing packages and map packages for ArcGIS Runtime Local Server 100.1.0 use ArcGIS Desktop 10.5.1.
dotMorten
  • 1,953
  • 1
  • 14
  • 10
  • I just used ArcGIS 10.5.1 to create a map package, but still facing the same issue. Cannot figure out why. The local map service can read the description of the map package, but cannot access the layers. – TTTZ Dec 04 '17 at 19:39
  • @dotMorten I have found that MPKs made using 10.5.1 are performing extremely slowly in ArcGIS Runtime 100.1, to the point where they are almost unusable. Is this to force us to use MMPKs? I have found MMPK performance to be excellent... – TheLastGIS Dec 08 '17 at 02:17
  • Of course not, but we are encouraging people to move towards MMPKs. We didn't make MPKs slow. With MMPKs we built a better more direct read and render architecture instead of going through a big heavy server and expensive serialization overheads. That's why it's way faster. Our goal is that runtime can natively support all the scenarios that you used to use Local Server for. Apart from Geoprocessing (which would never make it over), I think we are basically there now. And thank you for the compliment on the performance of that architecture :-) – dotMorten Dec 09 '17 at 05:18
0

The Local Server deployment created automatically contains only minimum resources required by default. If the map package contains shapefiles, raster data, etc, it needs to be specified in additional deployment options in the deployment config file.

TTTZ
  • 11
  • 1