如何从Google静态地图API获取图片

111*_*110 4 c# asp.net-mvc google-maps google-maps-api-3

我使用此代码从Google API生成静态图片,但我的请求太多,因此有时我会过度使用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";
Run Code Online (Sandbox Code Playgroud)

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

L.B*_*L.B 12

using (WebClient wc = new WebClient()) {
  wc.DownloadFile(url, @"c:\temp\img.png");
}
Run Code Online (Sandbox Code Playgroud)