【发布时间】:2018-03-24 14:22:46
【问题描述】:
我需要为每次平移和捏缩放下载打开街道地图图块。我使用 WebClient 从 Uri 下载图像。但我收到“一个 HttpWebRequest 已添加到连接组队列,因为已达到连接 linit,很快,我在 Xamarin iOS 中收到 System.Net.WebException。但我在 Xamarin.Android 中也是如此,其中的图像下载比 Xamarin iOS 好。
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);
【问题讨论】:
标签: c# xamarin.ios webclient system.net.webexception