Hello everyone,
I am looking for the code to generate dynamic image of map.is it possible?I want to generate dynamic image of map and also i can set extend and all.please help me,
I found one code but i am not sure how to use this code?
foreach (IMapFunctionality mf in Map1.GetFunctionalities()){
mf.DisplaySettings.ImageDescriptor.Height = imgheight;
mf.DisplaySettings.ImageDescriptor.Width = imgwidth;
mf.DisplaySettings.ImageDescriptor.TransparentBackground = true;
mf.DisplaySettings.ImageDescriptor.ImageFormat = ESRI.ArcGIS.ADF.Web.ImageFormat.PNG8;
ESRI.ArcGIS.ADF.Web.MapImage mi = mf.DrawExtent(Map1.Extent);
bitmaps.Add(mi.GetImage());
}
System.Drawing.Bitmap newimg = new System.Drawing.Bitmap(imgwidth, imgheight);
System.Drawing.Graphics imggraphics = System.Drawing.Graphics.FromImage(newimg);
imggraphics.FillRectangle(new System.Drawing.SolidBrush(System.Drawing.Color.LightGray), 0, 0, imgwidth, imgheight);
for (int j = bitmaps.Count-1; j >=0; j--){
System.Drawing.Bitmap bmp = (System.Drawing.Bitmap)bitmaps;
imggraphics.DrawImage(bmp, 0, 0, imgwidth, imgheight);
}
because i am not able to see Imapfunctionality.
Please help,
Thanks
Foram