Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / October 2007

Tip: Looking for answers? Try searching our database.

Getting error when creating a bitmap for Mappoint map image

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
amyyoungblood@hotmail.com - 22 Oct 2007 14:11 GMT
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.
Nicholas Paldino [.NET/C# MVP] - 22 Oct 2007 15:54 GMT
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?

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

>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
[quoted text clipped - 12 lines]
> I get error message when the bitmap line that says:
> Object reference not set to an instance of an object.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.