Hi Ben,

GeoExt is using OpenLayers as well and is just an additional layer on top of 
Ext-JS (for the interface components) and OpenLayers (for the mapping 
components). Therefore I think it wouldn´t be much extra-effort. You can just 
use your existing OpenLayers-code with your map-object. Instead of rendering 
this map-object directly to a div-container like you would usually do, you 
create a GeoExt-mappanel (http://geoext.org/lib/GeoExt/widgets/MapPanel.html)  
based on this. This mappanel is then used to create the GeoExt-PrintProvider 
(http://geoext.org/lib/GeoExt/data/PrintProvider.html) which you may then use 
for implementing the print-functionality. This enables the print-provider to 
get the currently activated layers and bounding-box from the map. Several 
examples of implementing this functionality are provided here (though the 
examples don´t seem to work currently but the scripts are still available): 
http://geoext.org/examples.html. What you will use of that depends on your 
intended functionality.

Cheers and good luck with the implementation,
Max

Von: Stephen V. Mather [mailto:s...@clevelandmetroparks.com]
Gesendet: Dienstag, 28. Mai 2013 21:54
An: Benjamin Krepp; geoserver-users@lists.sourceforge.net
Betreff: Re: [Geoserver-users] Use of Geoserver Pritning Module with OpenLayers 
client?

Hi Ben,

Writing clients for mapfish is not hard.  I don't have any OL examples to 
share, but you just need to PUT a specially formatted json to the service 
endpoint-- the json doc declares layers, extent, dpi, layout, etc.  I don't 
know how well the API is documented these days, but some hints can be found 
here:

https://smathermather.wordpress.com/category/gis/mapfish/

Best of luck,
Steve

[http://sig.cmparks.net/cmp-ms-90x122.png]Stephen V. Mather
GIS Manager
(216) 635-3243 (Work)
clevelandmetroparks.com<http://www.clemetparks.com>


________________________________
From: Benjamin Krepp [bkr...@ctps.org]
Sent: Tuesday, May 28, 2013 3:24 PM
To: 
geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net>
Subject: [Geoserver-users] Use of Geoserver Pritning Module with OpenLayers 
client?
Dear colleagues,

I have a couple of OpenLayers apps (backed by Geoserver) to which I'd like to 
add the ability to print the map in .pdf format. The Geoserver Printing Module 
(http://docs.geoserver.org/latest/en/user/community/printing/index.html) looks 
like it would provide the server-side support I'm looking for.

However, the documentation for the Print Module indicates that the print 
service it supports is meant to be used from GeoExt client-side apps. For a 
variety of reasons (not the least of which is budget limitations) I'm not in a 
position to re-implement the OL apps in question using GeoExt.

Given this, I have a couple of questions:

1.       Does anyone know if a plain-vanilla OpenLayers app can successfully 
make use of the Geoserver Printing Module service? If anyone does, I'd 
appreciate reference(s) to working sample code.

2.       If (1) is not possible, is there some approach that would work that 
wouldn't require re-writing the whole app to use GeoExt? For example, might it 
be possible to use GeoExt only in a very limited way (e.g., manage the 'map 
canvas') and rely on the existing body of OL code to handle everything else 
(e.g.,  manage on-screen controls, generation/display of legends, etc.) and 
still be able to exploit the Print Module? If the answer is 'yes', pointers to 
sample working code would be appreciated.

Since the answer to these questions might be found in either the GeoSever or 
OpenLayers communities, I'm posting this inquiry to both mailing lists. My 
apologies if you receive these questions twice.

Thanks in advance for any help you can offer with this.

Best regards,
Ben Krepp

Benjamin Krepp  |  Manager of GIS and IT
CENTRAL TRANSPORTATION PLANNING STAFF
617.973.7137  | bkr...@ctps.org<mailto:bkr...@ctps.org>
www.ctps.org/bostonmpo<http://www.ctps.org/bostonmpo>
[cid:image001.png@01CE5BF1.344ADB10]

<<inline: image001.png>>

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to