How to save a static map

Mar 18, 2010 at 7:18 PM

Hi,

Anynbody know how to save a Static map to JPG ?

 

Thanks

BBM

Aug 8, 2011 at 8:23 PM

 

 

 

Response.Clear()

Response.ClearContent()

Response.Charset = ""

Response.ContentType = "image/jpeg"

Response.AddHeader("content-disposition", "attachment;filename =somefilename.jpg")

Response.Cache.SetCacheability(HttpCacheability.NoCache)

 

 

 

Dim myCItrad As New System.Globalization.CultureInfo("EN-US", True

)

 

 

Dim sw As StringWriter = New

StringWriter(myCItrad)

 

 

Dim hw As HtmlTextWriter = New

HtmlTextWriter(sw)

 

 

GoogleMap1.RenderControl(hw)

Response.Write(sw.ToString)

Response.End()