C# 如何从Google静态地图API获取图像

C# 如何从Google静态地图API获取图像,c#,asp.net-mvc,google-maps,google-maps-api-3,C#,Asp.net Mvc,Google Maps,Google Maps Api 3,我使用这段代码从GoogleAPI生成静态图像,但是我有太多的请求,所以有时候我会从Google得到过度使用 string latlng = location.Latitude + "," + location.Longitude; string path = "http://maps.googleapis.com/maps/api/staticmap?center=" + latlng + "&zoom=16&size=200x200&maptype=roadma

我使用这段代码从GoogleAPI生成静态图像,但是我有太多的请求,所以有时候我会从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";

是否可以从C#调用此命令来生成和保存图像?我找不到获取图像对象的方法。

这是一个web应用程序吗(您用asp.net mvc标记了它)?如果是这样,您是生成img标记并让浏览器获取图像,还是需要服务器端的图像?是的,我需要服务器端的图像。我接受了@L.B的回答。你是个圣人!
using (WebClient wc = new WebClient()) {
  wc.DownloadFile(url, @"c:\temp\img.png");
}