Select to view content in your preferred language

MapLoadComplete event not being triggered

941
4
10-18-2012 11:44 AM
GaryBushek
Deactivated User
Does anyone have any ideas why MapLoadComplete would not be triggered occasionally?  Does it have to do with the services being idle too long?  This only happens every 10 times or so and its hard to code a message that the layers didn't load when its basically asynchronous.  Is there a known fix or work-around?

thanks, gary
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
What do you mean by 'MapLoadComplete' event?If you are talking about the Map.Progress event, this event may not be fired when the data (tiles and graphics) are already loaded locally.
0 Kudos
MarnikBlomme
Emerging Contributor
Try using the Initialized and InitializationFailed event for every layer you add to the map.

Something like:

layer.Initialized += LayerInitializedHandler;
layer.InitializationFailed += LayerInitializationFailedHandler;
map.Layers.Add(layer);
0 Kudos
GaryBushek
Deactivated User
What do you mean by 'MapLoadComplete' event?If you are talking about the Map.Progress event, this event may not be fired when the data (tiles and graphics) are already loaded locally.



No, there is a MapLoadComplete event handler and dispatch function in the EventCenter class from the Silverlight templates.  It seems when the services have been idol for a certain amount of time the MapLoadComplete event doesnt get fired.  If I hit refresh on the browser it loads fine.  This is very consistent when idol for a certain amount of time.
0 Kudos
GaryBushek
Deactivated User
Try using the Initialized and InitializationFailed event for every layer you add to the map.

Something like:

layer.Initialized += LayerInitializedHandler;
layer.InitializationFailed += LayerInitializationFailedHandler;
map.Layers.Add(layer);



That, as far as I can tell is part of the template code already.  It seems like a service idol issue.
0 Kudos