[GIS] Print Maps – OpenLayers, GeoServer, GeoExt, MapFish

geoextgeoservermapfishopenlayers-2

Can anyone point me towards a clear and unambiguous description of how to install and code a very simple map print function for OpenLayers/GeoServer?

I am using GeoServer 2.5.2 and OpenLayers 2.12 on a Windows machine. Javascript handles the OpenLayers map and I send a lot of stuff to VB.NET for heavier backend work.

As of now I have added the GeoServer 2.5 printing plugin, instructions here:

http://docs.geoserver.org/2.5.x/en/user/community/printing/

So far so good, everything works. After this point there are two options, MapFish Print Module or GeoExt. It appears that GeoExt requires Extjs which I would have to license (my project is not opensource) and I don't want to deal with licensing or license fees. Can GeoExt be used alone with OpenLayers/GeoServer to print?

The other option is MapFish – MapFish Print Module – which seems like a much better alternative but I am completely befuddled on how to integrate it into my existing GeoServer/OpenLayers/JavScript/Vb.NET application. For instance it says to build the file. Build it where? In windows command line? In a java editor?

Best Answer

Expanding on my comment:

Mapfish Print versus GeoServer Print module The MapFish Print Module is basically the exact same thing as the GeoServer printing module. In fact, the later is built from the former (the 2.4.x ad 2.5.x modulees is built from mapfish print 1.8. The 2.6 release will include MFP 2.0).

At this stage you won't gain much of anything by using the separate MFP; stick with the GeoServer module.

Actually using the module

Typically everyone uses GeoExt, but as you've noticed, this can tend to have a flaky website. There are websites that use it in turn, but I'm not sure if GeoExt requires ExtJS - makes sense that it does though so you're probably out of luck. Ask on the GeoExt list for confirmation. The alternative is to roll your own. The MFP protocol is documented here: http://www.mapfish.org/doc/print/protocol.html

Basically you need to send specially formulated GET or POST queries to specific URL's in JSON format. Shouldn't be too hard.

Note: You can use the mailing lists for either project (MFP or GeoExt), but both are extremely low volume.

Related Question