Quantcast
Viewing latest article 6
Browse Latest Browse All 8

Loading Image from "google maps static map" URL

Hi Jose,

 

you can also save the image file on the device.

 

 

Code Snippet

HttpWebRequest

httpRequest = (HttpWebRequest)HttpWebRequest.Create(WebUrl);

httpRequest.Timeout = 15000;

httpRequest.ReadWriteTimeout = 20000;

HttpWebResponse httpResponse = (HttpWebResponse)httpRequest.GetResponse();

Stream imageStream = httpResponse.GetResponseStream();

System.Drawing.

Bitmap buddyIcon = new System.Drawing.Bitmap(imageStream);

httpResponse.Close();

imageStream.Close();

buddyIcon.Save(PATH+FileName, System.Drawing.Imaging.

ImageFormat.Jpeg);

 

 

 


Viewing latest article 6
Browse Latest Browse All 8

Trending Articles