使用MapFish Print 3打印Image Layer无显示问题求助
MapFish Print 3打印Image Layer时图片无法显示
尝试使用MapFish Print 3打印Image Layer,已测试绝对图片路径、相对路径及URL等多种打印请求方式,打印任务能成功完成,但目标图片始终未在输出的地图中显示。
打印请求JSON内容
{ "outputFormat": "pdf", "layout": "A4 landscape", "outputFilename": "file", "attributes": { "map": { "dpi": "300", "rotation": 0, "bbox": [ 1617602.8915079264, 5888215.094869674, 1622199.0367374036, 5890693.644391326 ], "projection": "EPSG:3857", "layers": [ { "baseURL": "http://mapsNEU.wien.gv.at/basemap/bmapoverlay/normal/google3857/{TileMatrix}/{TileRow}/{TileCol}.png", "imageFormat": "image/png", "layer": "bmapoverlay", "type": "WMTS", "version": "1.0.0", "requestEncoding": "REST", "matrixSet": "google3857", "matrices": [ ... ] }, { "type": "image", "baseURL": "https://github.com/geotools/geotools/raw/main/geotools-logo.png", "extent": [ 1617602.8915079264, 5888215.094869674, 1622199.0367374036, 5890693.644391326 ], "name": "test", "opacity": 1, "imageFormat": "image/png" } ] } } }
config.yaml配置内容
templates: # default A4 landscape: !template reportTemplate: default/A4LandscapeReport.jrxml attributes: abteilung: !string {} title: !string {} user: !string {} zweck: !string {} myScale: !string {} kunde: !string {} img: !string {} map: !map maxDpi: 400 width: 814 height: 439 scalebar: !scalebar width: 200 height: 40 default: align: "left" intervals: 3 type: "bar" unit: "m" northArrowDef: !northArrow size: 30 default: graphic: "file://NorthArrow_10.svg" processors: - !reportBuilder directory: 'default/.' - !createMap inputMapper: {map: map} outputMapper: {mapSubReport: mapSubReport, mapContext: mapContext} - !createScalebar {} - !createNorthArrow inputMapper: {map: map, northArrowDef: northArrow}
最终输出结果

内容的提问来源于stack exchange,提问作者Fabian
相关产品推荐
相关产品推荐

