Getting error when creating a bitmap for Mappoint map image

  • Thread starter Thread starter amyyoungblood
  • Start date Start date
A

amyyoungblood

I am trying to plot my pushpins manually, but when I go to create the
bitmap, I get an error message. Has anyone gotten this message
before?

code:
MapImage[] mapImages = render.GetMap(mapSpec);
MapImage mi = new MapImage();
mi = mapImages[0];

Bitmap newBitmap = new Bitmap(800, 600);
Graphics graphics = Graphics.FromImage(newBitmap);
Bitmap mapBitmap = new Bitmap(new
System.IO.MemoryStream(mi.MimeData.Bits));

I get error message when the bitmap line that says:
Object reference not set to an instance of an object.
 
Well, it's one of three things, it's either mi, the MimeData property on
mi, or the BitsProperty on the return value of the MimeData property on mi.
Have you looked in the debugger to see which it is?
 
Back
Top