dagrizz

Blank Image from ExportMapImage

Discussion created by dagrizz on Nov 17, 2010
Latest reply on Nov 18, 2010 by dagrizz
I'm currently working on a REST service to export a map image for query results. I was able to return an image, but it is blank. I'm sure I am missing something simple.

IMapServerInfo mapServerInfo = mapServer.GetServerInfo(mapServer.DefaultMapName);
IMapDescription aMapDescription = mapServerInfo.DefaultMapDescription;
               
IImageDescription anImageDescription = new ImageDescription();

IImageType imgType = new ImageType();
imgType.Format = ESRI.ArcGIS.Carto.esriImageFormat.esriImagePNG;
imgType.ReturnType = ESRI.ArcGIS.Carto.esriImageReturnType.esriImageReturnMimeData;

IImageDisplay imageDisp = new ImageDisplay();

imageDisp.Height = 400;
imageDisp.Width = 400;
imageDisp.DeviceResolution = 96;

anImageDescription.Type = imgType;
anImageDescription.Display = imageDisp;
IMapImage aMapImage = mapServer.ExportMapImage(aMapDescription, anImageDescription);

Outcomes