I'm using mapView.SetViewpoint in a loop:
mapView.SetViewpoint(viewpoint);
while (mapView.DrawStatus == DrawStatus.InProgress && !mapView.IsNavigating)
{
var loaded = mapView.Dispatcher.Invoke(() => mapView.IsLoaded);
if (!loaded)
{
break;
}
mapView.SetViewpoint(viewpoint);
await Task.Delay(200).ConfigureAwait(false);
}
In some scenarios it set viewpoint after 2-3 times, but in some other scenarios it needs 5 to 25 minutes of looping.
I noticed that when this code is called on "Albers" map projection it needs time. The map projection where is working fine is "Mercator". Do you perhaps know why it is taking so long and how it can be handled?
Thank you!
What's the purpose of this code? I don't really see why you need to set the viewpoint over and over again? With a little more understanding of the scenario you're trying to solve, I might be able to advice a cleaner way to do it.