Good afternoon, all!
I am developing an application using the new Silverlight API (using v2 RC right now, Silverlight 4, and Visual Studio 2010/Blend 4), and I'm experiencing some odd behaviour when printing maps. The application consists of several cached tiled layers, only one of which is visible at any given time (different kinds of base maps, ie a standard map, several imagery maps, a zoning map, etc), and a selection of dynamic layers that can be turned on and off.
Once the user (me, at this point, as the application is not yet live) has chosen the layers they'd like turned on, they can hit a print button, and I generate a child window for them with their chosen tiled layer, and any dynamic layers they've turned on. I also zoom this map in to the same extent the user was viewing on the big map. At this point, all is well - the correct layers are showing in the correct places, and all is zoomed in to the correct extent.
When the user actually prints the map, though, the dynamic layers are correctly positioned, but the tiled layer is skewed to the northwest, sometimes so far that the region of the map the user originally chose doesn't show up on the printout.
I'm afraid I'm very lacking in GIS knowledge - we have a GIS group here that created the layers I'm using, and I'm building an application to showcase them.
I'm using the standard silverlight 4 printing behaviour:
PrintDocument doc = new PrintDocument();
doc.PrintPage += (s, args) =>
{
args.PageVisual = bMapOutline;
args.HasMorePages = false;
};
doc.Print("Map");
where bMapOutline is a border placeholder I created to hold my created map.
I can supply the code I use to construct the print preview map, and any other information that might be helpful in solving this, if you can please let me know what's useful to see.
Thanks in advance for your help!
Lisa Chesley
Web/Application Developer
The County of Oxford, Ontario, Canada