Select to view content in your preferred language

Map saved to a bitmap file

1046
2
02-06-2011 10:49 AM
MarkBaird
Esri Regular Contributor
I'm trying to get a Silverlight application to save the currrent contents of the map control to a png file or eventually a PDF.  This means that I've got to get the contents of the map into a bitmap.

I've had all sorts of problems due to my map being made of contents from different domains.  I've got the following layers:

- bing maps
- an ArcGIS Server dynamic map service
- a graphics layer

Now I've partially solved the issue with data from different domains by using the proxyurl as in the following link.

http://help.arcgis.com/en/webapi/silverlight/help/index.html#/Secure_services/016600000022000000/

Nowever this doesn't solve the issue with the bing maps layer...  is there a solution to this?

//this is for getting the bing graphics:
WriteableBitmap layer0 = new WriteableBitmap(Map.Layers[0].ToBitmap());

results in:

Pixels = 'layer0.Pixels' threw an exception of type 'System.Security.SecurityException'

It's because the data is from a different domain...
0 Kudos
2 Replies
MarkBaird
Esri Regular Contributor
Just wondering if anyone had any experience of getting the Bing imeragery into a bitmap?

It's a nasty problem that prevents the app from exporting pdf, png etc images of the map for reporting purposes.

Any help appreciated
0 Kudos
Ramonvan_Bruggen
Deactivated User
I have the same question! I'm trying to capture the current map layout including all graphics to a image, but I get the Pixel  'System.Security.SecurityException'
0 Kudos