Select to view content in your preferred language

Any chance to move the initialization on a background thread?

659
1
09-04-2010 11:35 PM
MarioVernari
Emerging Contributor
Hello again.
I've noticed that, if the network connection isn't really fast, the initialization of the Map control is quite slow. It takes from one to three seconds to init (maybe more through GPRS), where the UI is totally locked (due the main thread busy).
There's no way to perform any progression bar, nor animation during this delay.
Do you think would be possible to move part/whole the init process on a separate thread, thus having the ability to free the UI thread?
Thanks again.
Mario
0 Kudos
1 Reply
TylerRothermund
Emerging Contributor
Is this possible?  I also would like this feature.   I'm loading a KML file from a stream and it takes close to 5 seconds and locks the UI.

KmlLayer layer = (KmlLayer)Resources["RangesLayer"];
using (var stream = App.GetResourceStream(new Uri("/MyProject.Map;component/Locations.kmz", UriKind.Relative)).Stream)
{
     layer.SetSource(stream);
}
MyMap.Layers.Add(layer);
0 Kudos