LocalMapService load .mpk map fail

2862
1
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
1 Reply
FreddieGibson
Regular Contributor II

Could you upload your map package?

0 Kudos