[OpenLayers-Users] Printing Vector Layers

Greg Allensworth gregor at greeninfo.org
Mon Apr 23 16:10:14 EDT 2012


A possibility, though a bit brutish, can be to save the vertices to a 
database and load them as a temporary WMS layer. I'd POST the shapes' 
geometry as WKT to some server-side script, save the vertices to a 
database, and generate some identifying single-use key. Then, supply 
this key to your print request and have it load a WMS layer.

This sounds complicated, but is a bit easier than it sounds, and does 
get the job done.

Another printing process is to use wkhtmltopdf. which eliminates the 
whole tile stitching process. However, this doesn't do vectors, so don't 
bother trying.

-- 
Greg Allensworth, Web GIS Developer
BS  A+  Network+  Security+  Linux+  Server+
GreenInfo Network - Information and Mapping in the Public Interest
564 Market Street, Suite 510  San Francisco CA 94104
PH: 415-979-0343 x302  FX: 415-979-0371    email: gregor at greeninfo.org
Web: www.GreenInfo.org     www.MapsPortal.org

Subscribe to MapLines, our e-newsletter, at www.GreenInfo.org


More information about the Users mailing list