Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

My organization has a web application for displaying global and regional climate data and we're considering improvements to it. Our leading idea is to create an OpenLayers-based application to display climate rasters over base layers like OSM or Google Maps. The map may also include some other application-specific vector layers and a color bar or other legend features describing the data. Near as I can tell, this all seems do-able with OpenLayers.

One requirement for the project, though, is to be able to export (ideally from the web-app) publication quality (more-or-less) maps. A typical use case would be something like this:

  1. A user, using the base layer as a guide, navigates to their area of interest
  2. The user selects a climate parameter (e.g. mean temp for the 2040s) or set of parameters
  3. The user hits the "export" button and then downloads a good quality map which includes all of the elements described in the first paragraph.

I haven't been able to find anything in OpenLayers about rendering to an image. Does anyone know whether this is possible? And if not what other approaches for rendering could we take? I would suppose that we would need to pass all of the map parameters (bbox, projection, included layers, etc.) out to some external rendering engine; what open source rendering engines our out there?

share|improve this question
I have implemented exporting as png/pdf and printing of openlayers maps here at www.mapsdata.co. you can register and check. –  Rayiez Jan 3 '13 at 5:53

3 Answers 3

The main ways to display pretty print maps from openlayers I know are:

-Geoserver with Geoext

-Mapfish with Geoext

Both solutions rely on a java part(e.g. http://geoserver.org/display/GEOS/Printing+in+GeoServer or http://www.mapfish.org/doc/print/)

-Openlayers standalone (See the official doc http://trac.openlayers.org/wiki/Printing)

More recently, a technique appears to render image with PhantomJS (a software simulating browser from command line) http://acuriousanimal.com/blog/2012/09/17/creating-static-maps-in-openlayers-using-phantomjs/

Some recent libraries use browser Canvas rendering abilities to "catch" image like this OpenLayers 3 example or this Leaflet one

share|improve this answer

Think you will need to look into Geoserver to create a WFS or WMS or WMST service http://geoserver.org/display/GEOS/What+is+Geoserver

Then Openlayers can parse the Geoserver service


WMTS (Web Map Tile Service) http://openlayers.org/dev/examples/wmts.html

share|improve this answer

To get "publication quality" you want 300dpi, so using the maps you pass to open layers for screen rendering is probably a non-starter.

OpenStreetMap's export tab uses OpenLayers to select what you want to export, but then renders it with a separate backend server process (actually a choice of several). This is probably the approach you will have to take. You are unlikely to be able to use Google Maps for this.

share|improve this answer
Well, "publication quality" would more likely mean svg or some other vector format. And when I put it in those terms, it makes me think that, yes, we probably will want to use Mapnik or something to render a basemap from the planet.osm file. Then we could use some image library to overlay the other elements (climate raster, legend elements, attributes). You're right that Gmaps is probably out for the exporter (for a variety of technical and non-technical reasons). Anyways, thanks for all of the responses. –  Hiebert Sep 10 '10 at 16:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.