protected void btnExport_Click(object sender, EventArgs e) { InMemoryFeatureLayer tempEditlayer = new InMemoryFeatureLayer(); tempEditlayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.CreateSimpleCircleStyle(GeoColor.FromArgb(180, 102, 255, 102), 10, GeoColor.StandardColors.DarkGreen, 1); tempEditlayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.CreateSimpleLineStyle(GeoColor.StandardColors.Green, 4, true); tempEditlayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb(180, 102, 255, 102), GeoColor.StandardColors.DarkGreen, 1); tempEditlayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; foreach (Feature feature in Map1.EditOverlay.Features) { if (!tempEditlayer.InternalFeatures.Contains(feature.Id)) { tempEditlayer.InternalFeatures.Add(feature.Id, feature); } } LayerOverlay tempOverlay = new LayerOverlay("TempOverlay"); tempOverlay.IsBaseOverlay = false; tempOverlay.Layers.Add(tempEditlayer); Map1.CustomOverlays.Add(tempOverlay); Bitmap result = Map1.GetBitmap((int)Map1.WidthInPixels,(int)Map1.HeightInPixels); PdfDocument doc = new PdfDocument(); PdfPage page = new PdfPage(); XImage img = XImage.FromGdiPlusImage(result); img.Interpolate = false; doc.Pages.Add(page); XGraphics xgr = XGraphics.FromPdfPage(doc.Pages[0]); xgr.DrawImage(img, 0, 0); doc.Save(@"d:\capture.pdf"); doc.Close(); Map1.CustomOverlays.Remove(tempOverlay); }