smas1 / geoext-viewer

Automatically exported from code.google.com/p/geoext-viewer
GNU General Public License v3.0
0 stars 0 forks source link

Printing layers with CQL filters causes an MapFish error #416

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

It seems the command sent to MapFish is truncated if the layer has a CQL entry.

1. Use layer with a cql definition:
...
overlay_isis_gis_tunnel_mSAPK_mSAPN: new 
OpenLayers.Layer.WMS(Heron.scratch.layerconnect.overlay_isis_gis_tunnel_mSAPK_mS
APN[0],
        Heron.scratch.layerconnect.overlay_isis_gis_tunnel_mSAPK_mSAPN[1],
{  layers: Heron.scratch.layerconnect.overlay_isis_gis_tunnel_mSAPK_mSAPN[2]
 , styles: Heron.scratch.layerconnect.overlay_isis_gis_tunnel_mSAPK_mSAPN[3]
 , format: "image/png"
 , cql_filter: "ANL_OK='T' AND NETZ_OK='T'"
 , env: "Col1:#00FF00;Col2:#00FF00"
 , transparent: true
},
{  singleTile: true, ratio: 1.0, buffer: 0, isBaseLayer: false, visibility: 
false, noLegend: false
 , attribution: Heron.scratch.layerconnect.overlay_isis_gis_tunnel_mSAPK_mSAPN[4]
 , featureInfoFormat: Heron.scratch.layerconnect.overlay_isis_gis_tunnel_mSAPK_mSAPN[5]
}
)
...
2. Use PrintDirect or PrintDialog function

What is the expected output? What do you see instead?
- should show the filtered data with a legend
- instead: MapFish error - see log:

=================
MapFish error log
=================

Layer definition + CQL-filter + 'noLegend: false' ==> MapFish error
===================================================================
2015-03-02 08:24:32,614 [http-8080-11] DEBUG h.print.servlet.BaseMapServlet - 
Generating PDF for spec=
{"units":"m","srs":"EPSG:31467","layout":"A4 
Hoch","dpi":100,"outputFormat":"pdf","mapTitle":"ISD - GeoWeb - 
Viewer","mapComment":"","mapFooter":"Projektion - 
EPSG:31467","mapAttribution":" VG 2500 © 2012 GeoBasis-DE/BKG , DB-GIS © DB 
Netz AG 
","layers":[{"baseURL":"http://isdduisr019.sv.db.de:8080/geoserver/wms","opacity
":1,"singleTile":true,"type":"WMS","layers":["isd-
org:vg2500-bld"],"format":"image/png","styles":[""],"customParams":{"TRANSPARENT
":false}},
{"baseURL":"http://isdduisr019.sv.db.de:8080/geoserver/wms","opacity":1,"singleT
ile":true,"type":"WMS","layers":["isd-isis:isis-gis-
tunnel"],"format":"image/png","styles":["ISIS-GIS-Tunnel-ALL-F"],"customParams":
{"CQL_FILTER":"ANL_OK='T' AND 
NETZ_OK='T'","ENV":"Col1:#00FF00;Col2:#00FF00","TRANSPARENT":true}}],"pages":[{"
center":
[3580000,5660000],"scale":10000000,"rotation":0}],
"legends":[{"name":"Tu DB-GIS (+) SAP R3/K (+) SAP R3/N","classes":[{"name":"",
"icons":["http://isdduisr019.sv.db.de:8080/geoserver/wms?CQL_FILTER=ANL_OK%3D"]}
]}]}
                                                         ====================  

<ServiceException>
 Could not parse CQL filter list.
Encountered &quot;= &lt;EOF&gt;&quot; at line 1, column 7.

==========================================================
Layer definition + CQL-filter + 'noLegend: true' ==> works
===================================================================
Layer definition + 'noLegend: false' (without CQL-filter) ==> works
===================================================================

Original issue reported on code.google.com by wolfram.winter on 2 Mar 2015 at 8:29