Tag Archives: Javascript

Printing Maps from Javascript Web Applications

I’ve recently been involved in developing  a web application using the ArcGIS Javascript API. I thought I’d share some of the things I learned on this project on printing, partly as catharsis but mostly so it might help someone else to speed up their development process.

One of the requirements for the application was to be able to create a print friendly layout of the map area. The map basically displayed two tiled map services: the MDS foundation map and another map service overlaid on top.

My initial thought was to create a new web page in the required layout which simply recreated the map object that was in the main app window. This appeared to work well until I actually printed the page, when I noticed that different browser types where handling the printing with varying degrees of accuracy. Take a look below to see what I mean. Firefox prints the overlying map service offset from the MDS base map service:

Continue reading