Каков наилучший способ загрузки изображения с url-адреса в xamarin iOS?
I need to download Open street map tile for every panning and pinch zooming. I have used WebClient for downloading image from Uri. But I am getting “An HttpWebRequest was added to the connection group queue because the connection limit was reached and soon,I am getting System.Net.WebException in Xamarin iOS. But I am doing the same in Xamarin.Android, where images are downloaded comparatively better than the Xamarin iOS.
What I have tried:
WebClient webClient = new WebClient();
byte[] imageBytes = null;
Uri uri = new Uri("http://tile.openstreetmap.org/" + Scale.ToString() + "/" + i.ToString() + "/" + j.ToString() + ".png");
imageBytes = await webClient.DownloadDataTaskAsync(uri);
webClient.Dispose();
webClient= null;