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!