I am going to make an application that allows people to print the currently map. My map has a overview map at the left-bottom corner, while people want to print the map out, the overview map should accompany with the printed-map. I have implemented the code as attached in sandbox, but it seems not working...Any help would be appreciated. (Please paste the attached code into the sandbox)
I have not tested this but I have an idea for you to try. For fine granular control of the Print feature, consider using the esri/tasks/PrintTask. Then in your code, in the esri.dijit.OverviewMap, add an id: "OverviewMap" property. This way you can reference it using dijit.byId("OverviewMap"). When you call the printTask.execute() method, define a result function similar to your handlePrintInfo(resp) function. Reference the dijit.OverviewMap using dijit.byId("OverviewMap"). See if you can extract the overview map image from the dijit and then include it with the printTask results. To get the overlay effect of the overview map, maybe build a new HTML page with a couple of div's and use CSS to overlay the "OverviewMap" image on top of the map image, open this new HTML page in a new window (window.open()), and call the window.print() function all at once. This way there are not too many extra clicks needed by the user.
Hope this helps.