I use this code to generate static images from Google API, but I have too many requests, so sometimes I get overuse from Google.
string latlng = location.Latitude + "," + location.Longitude;
string path = "http://maps.googleapis.com/maps/api/staticmap?center=" + latlng +
"&zoom=16&size=200x200&maptype=roadmap&markers=color:blue%7Clabel:S%7C" +
latlng + "&sensor=false";
Is it possible to call this from C# to generate and save images? I can't find way to get an image object.
using (WebClient wc = new WebClient()) {
wc.DownloadFile(url, @"c:\temp\img.png");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With