6

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?

  • I can answer part of it - The MapFish Print Module is basically the exact same thing as the GeoServer 2.5 printing module. In fact, the later is built from the former. At this stage you won't gain much of anything by using the separate MFP; stick with the GeoServer module. Personally I'm not aware of any other library other than GeoExt that works with MFP, but they may exists. Or I guess you could roll your own. – GIS-Jonathan Jul 25 '14 at 20:23
  • Thanks GIS-Jonathan. That helps. But, I am still not sure how to code anything so I can access the functionality in the GeoServer print module. Did I miss a link somewhere that would describe the scripts I need to write? – Todd Krueger Jul 25 '14 at 21:01
  • 1
    It doesn't help that none of the printing examples at GeoExt work. – Todd Krueger Jul 25 '14 at 23:00
3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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