LocalMapService load .mpk map fail

4176
12
07-05-2015 08:39 PM
坤王
by
New Contributor

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);

            }

        }

0 Kudos
12 Replies
AnttiKajanus1
Occasional Contributor III

Hi,

We fixed issues with directory paths with multi-byte chars in 10.2.6 release. Please update to that and let us know if you are still seeing this issue.

  • BUG-000083073: ArcGIS Runtime apps fail to execute when run within a directory that contains a multi-byte character.
0 Kudos
坤王
by
New Contributor

Hi,

I use 10.2.5 before, but now I use 10.2.6 and report the same fault.

And i don't see "BUG-000083073" error.How to see it?

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

It's still hard to tell exactly what the problem is. Possibly there is an issue unpacking the MPK and starting the local map service, although this should raise an exception which will be caught in the try/catch around the awaited StartAsync call. To help determine this you can enable LocalServer logging following the instructions on Work with local services—ArcGIS Runtime SDK for .NET | ArcGIS for Developers

Cheers

Mike

0 Kudos