Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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;
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900