Hi,
I need to get a screen copy of the current map & layers and then to attach the bitmap to an email.
I know how to deal with the email, what I do not know is how to generate the bitmap from the current web page...
thanks a lot.
jm.
Hi,
I need to get a screen copy of the current map & layers and then to attach the bitmap to an email.
I know how to deal with the email, what I do not know is how to generate the bitmap from the current web page...
thanks a lot.
jm.
Hi Jean-Marie,
You can create a bitmap from your current map with the following:
Bitmap bmp = Map1.GetBitmap();
bmp.Save(@"d:\yourbitmap.png");
You will need to create the mechanism to take that bitmap and pass it to the user's e-mail application.
Hi,
Thanks for your answer. However, does not work… I get an exception when inside the Map1.GetBitmap() function.
Exception Message : Cannot use a leading … to exit above the top directory.
any idea?
jm
Hi Jean-Marie,
I am not convinced this a problem with the GetBitmap() function as this would seem to be a file path issue where your file path definition is not valid. If possible please provide a sample or screenshots that can demonstrate this issue.
Also what Overlays do you have added to the Map?
How can I debug? The GetBitmap() failed when invoked!
Hi Jean-Marie,
To best assist you will will need additional information about how and where (server-side?) in your application you are invoking the GetBitMap() method. This is a well-used method so there must be other elements involved that are causing issues.
Can you provide us a code sample, screenshot of the complete exception?