Hi,
I created some service (generic handler) to return map image, but instead of map I got 'Black Square'. How can I save image into outputstream? I can cretate another page and send WebRequest to it, but I prefer to have direct way.
Here is my code:
Map Map1 = new Map("WorldMap", 500, 500);
Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF"));
WorldMapKitWmsWebOverlay worldMapKitOverlay = new WorldMapKitWmsWebOverlay();
Map1.MapUnit = GeographyUnit.DecimalDegree;
Map1.CustomOverlays.Add(worldMapKitOverlay);
Map1.CurrentExtent = new RectangleShape(-131.22, 55.05, -54.03, 16.91);
context.Response.ContentType = "image/jpeg";
System.Drawing.Bitmap bmp = Map1.GetBitmap();
bmp.Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
context.Response.End();