[GIS] Export map as image by Openlayers

geoserveropenlayers-2

I am using Openlayers to publish maps and Geoserver as map server. Now I can add more than one layer in Openlayers like WMS , Vector , WFS and Google Maps as base map. How can i export map's current viewport as image.

EDIT: I need to print base layers also. Base layer may be Google maps , Bing maps etc.

Best Answer

http://trac.osgeo.org/openlayers/wiki/TileStitchingPrinting

This has worked very well for me. Right now I am using OL2.12. If I remember correctly I had to tweak the OL control a little bit for my purposes. On the server side I am using python and as the directions say you need to install the PIL library. I have my python server side code sitting in my /cgi/print_image.cgi. It was not difficult to get set up.

Related Question