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.

When using OpenLayers I can compose a map with several layers which is displayed nicely by my browser, but I need to do the same server side (no browser composing the layers), and I'm waiting a image file as output (ie PDF, SVG, JPEG or PNG).

I need to do composition with at least OSM and Vector layer types.

What are my solutions ?

share|improve this question
add comment

2 Answers

Sounds to me like MapFish Print will do exactly what you want. We use it to do exactly this from a web mapping application.

share|improve this answer
    
I tried to use MapFish Print, but it must be tweaked to ouput a PNG without margins, title, comments. And the composition with multiple layer is not documented (AFAIK). Reading java source code and trial and error is quite time consuming for a task that seemed to me quite trivial. Have you some hints ? –  vaab Aug 17 '12 at 6:00
add comment

This looks like a perfect use-case for GeoServer. I guess Mapserver would also fit you needs.

I've personally build something similar to make a printable version of an OpenLayers powered map. This map was displaying complex data coming from GeoServer on top of Google base maps (WMS protocl was used between OL and GeoServer).

What I did was simply to observe the WMS request coming from OpenLayers and hacked it to fit my needs: add a base layer, add a small logo in the corner of the map, asks for the Jpeg output format, request a different SLD to provide "printer-friendly" styling, ...

Hope this helps !

share|improve this answer
    
There is a community module for GeoServer that integrates MapFish. This could have also been a valid approach for you. The benefit of MapFish is that it allows control of the print template. –  CHenderson Aug 16 '12 at 15:25
    
Similar solution here. I inject the URL into a jasper report and the magic happens. –  Pablo Aug 16 '12 at 17:43
    
@CHenderson the print template is a burden for me. I'm using BIRT to make my reports. I managed to tweak the output to remove all titles, comments, margin and only display the map in PNG... but this doesn't seems natural. Did I miss something obvious ? –  vaab Aug 17 '12 at 6:17
add comment

Your Answer

 
discard

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.