//Set visible map extents map.Center = new SharpMap.Geometries.Point(centerX, centerY); map.Zoom = Zoom; //Generate map System.Drawing.Bitmap img = (System.Drawing.Bitmap)map.GetMap(); //Stream the image to the client context.Response.ContentType = "image/png"; System.IO.MemoryStream MS = new System.IO.MemoryStream(); img.Save(MS, System.Drawing.Imaging.ImageFormat.Png); // tidy up img.Dispose(); byte[] buffer = MS.ToArray(); context.Response.OutputStream.Write(buffer, 0, buffer.Length); public SharpMap.Styles.VectorStyle GetChartingStyle(SharpMap.Data.FeatureDataRow row) { SharpMap.Styles.VectorStyle style = new SharpMap.Styles.VectorStyle(); int numMale = int.Parse(row["male"].ToString()); int numFemale = int.Parse(row["female"].ToString()); style.Symbol = this.GetChart(numMale, numFemale); return style; }
2022-06-17 14:52:36 549KB SharpMap  ZedGraph 饼图 实例
1