2

Does anyone know how to pass cql_filter params into MapFish's Print module? I already tried this, but it does not work. It generates the PDF but I get this error "The byte array is not a recognized imageformat. ":

{
  "units" : "degrees",
  "srs" : "EPSG:4326",
  "layout" : "A4 portrait",
  "dpi" : 75,
  "mapTitle" : "Printing Demo",
  "comment" : "This is a simple map printed from GeoExt.",
  "layers" : [{
      "baseURL" : "http://zzz.com:8080/geoserver/wms",
      "opacity" : 1,
      "singleTile" : true,
      "type" : "WMS",
      "layers" : ["zzz:yyy"],
      "customParams" : {
        "CQL_FILTER" : "dico in('1106')"
      },
      "format" : "image/jpeg",
      "styles" : [""]
    }
  ],
  "pages" : [{
      "center" : [-9.157682, 38.741626],
      "scale" : 4000000,
      "rotation" : 0
    }
  ],
  "legends" : [{
      "name" : "Tasmania",
      "classes" : [{
          "name" : "",
          "icons" : ["http://zzz.com:8080/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&EXCEPTIONS=application/vnd.ogc.se_xml&LAYER=zzz:yyy&FORMAT=image/gif&SCALE=4000000"]
        }
      ]
    }
  ]
}
1

Assuming that you are running GeoSolution's fork of Mapfish then the code you have there will work. So I would suspect that there is some issue with your setup as even if you are running the stock set up all it does is ignore your CQL Filter.

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.