Johnny,
That's not quite it, no. I have set the MapUnit and current extent, as well as the width of the bitmap. The code doesn't work regardless of if I'm trying to make a bitmap, or just display it on a web page. Essentially, it's the same code that Khalil had, plus one line.
if (!Page.IsPostBack) {
Map1 = new Map();
Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF"));
Map1.CurrentExtent = new RectangleShape(-13939426.6371, 6701997.4056, -7812401.86, 2626987.386962);
Map1.MapTools.PanZoomBar.Enabled = true;
Map1.MapTools.MouseCoordinate.Enabled = true;
Map1.MapUnit = GeographyUnit.Meter;
GoogleOverlay google = new GoogleOverlay("Google Map");
google.JavaScriptLibraryUri = new Uri(ConfigurationManager.AppSettings["GoogleUri"]);
google.GoogleMapType = GoogleMapType.Normal;
Map1.CustomOverlays.Add(google);
SimpleMarkerOverlay markerOverlay = new SimpleMarkerOverlay("MarkerOverlay");
markerOverlay.DragMode = MarkerDragMode.Drag;
markerOverlay.Markers.Add(new Marker(-8922952.93266, 2984101.58384, new WebImage(21, 25, -10.5f, -25f)));
markerOverlay.Markers.Add(new Marker(-10830821.09801, 4539747.98328, new WebImage(21, 25, -10.5f, -25f)));
markerOverlay.Markers.Add(new Marker(-12454955.13517, 4980025.26614, new WebImage(21, 25, -10.5f, -25f)));
markerOverlay.Markers.Add(new Marker(-10772117.52067, 3864656.14956, new WebImage(21, 25, -10.5f, -25f)));
markerOverlay.Markers.Add(new Marker(-13164290.75755, 4035875.09290, new WebImage(21, 25, -10.5f, -25f)));
markerOverlay.Markers.Add(new Marker(-9754587.80028, 5156136.17929, new WebImage(21, 25, -10.5f, -25f)));
Map1.CustomOverlays.Add(markerOverlay);
Bitmap bmp = Map1.GetBitmap(300, 150);
bmp.Save(@"d:\c.png");
}
Does that help at all? Thanks.
-Dustin