rnatalie

LocalMapService what do I have to wait for?

Discussion created by rnatalie on Apr 23, 2013
Latest reply on Apr 24, 2013 by MBranscomb-esristaff
I'm loading a local map package as follows:

            map_pkg = new ArcGISLocalDynamicMapServiceLayer("C:\Users\Me\foo.mpk");
            map_pkg.EnableDynamicLayers = true;
            map.Layers.Add(map_pkg);


If I immediately check the Layers in in map_pkg there's nothing there, the property is null.
If I let the application run for a bit and process some events and check back, it is populated with the layers in the file.

Is there anyway either prior to adding the pkg to the map or shortly there after to inspect the layers (I'd like to adjust the visibility early one).

Outcomes