private void DisplayMap_Load(object sender, EventArgs e) { winformsMap1.MapUnit = GeographyUnit.DecimalDegree; GdiPlusRasterLayer gdiPlusRasterLayer=new GdiPlusRasterLayer(); gdiPlusRasterLayer.StreamLoading += new EventHandler(a_StreamLoading); LayerOverlay ov=new LayerOverlay(); ov.Layers.Add(gdiPlusRasterLayer); winformsMap1.Overlays.Add(ov); winformsMap1.Refresh(); } void a_StreamLoading(object sender, StreamLoadingEventArgs e) { if (e.StreamType == "Image File") { Bitmap bitmap = new Bitmap(@"..\..\SampleData\Data\world.tif"); bitmap.RotateFlip(RotateFlipType.Rotate90FlipNone); MemoryStream memoryStream=new MemoryStream(); bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Tiff); e.AlternateStream = memoryStream; } if (e.StreamType == "World File") { Stream stream = new FileStream(@"..\..\SampleData\Data\world.tfw", FileMode.Open, FileAccess.Read); e.AlternateStream = stream; } }