Closed jaykayone closed 9 years ago
if I have several print layouts (a4 portrait, a4 landscape, a3 portrait, a3 landscape), I need one config defining them all and one jrml - file per layout. is that correct?
yes :-)
Our legends are html - documents that are embeded as iFrames.
I tried to use a HTML - Element of type iframe in the legend part
OK, can't attach pdf, i'll send an email
another issue I saw: the scalebar refers to distances measured in webmercator (as the data is in webmercator), but we would prefer it to refer to LUREF distances. is there a possibility?
another issue I saw: the scalebar refers to distances measured in webmercator (as the data is in webmercator), but we would prefer it to refer to LUREF distances. is there a possibility?
Are you talking about the print report specifically here, or are you also referring to the ol3 map?
I am talking about the print report, but the problem is the same for the map. @petzlux is analyzing what this means for his infobar directive
I can't get WMTS layers to work in REST - mode ..
According to the code here [1], I should put the entire templateURL (see below), but I get an AssertError:
Exception in thread "main" com.vividsolutions.jts.util.AssertionFailedException: invalid baseURL at com.vividsolutions.jts.util.Assert.isTrue(Assert.java:71) at org.mapfish.print.map.tiled.wmts.WMTSLayerParam.postConstruct(WMTSLayerParam.java:107)
{
"type":"WMTS",
"baseURL": "http://wmts.geoportail.lu/mapproxy_4_v3/wmts/basemap_global/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.png",
"opacity": "0.5",
"layer": "basemap_global",
"requestEncoding":"REST",
"version":"1.0.0",
"dimensions":[],
"dimensionParams":{},
"matrixSet":"GLOBAL_WEBMERCATOR",
"matrices":[
{
"identifier": "00",
"matrixSize": [1, 1],
"scaleDenominator": 559082264.029,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "01",
"matrixSize": [2, 2],
"scaleDenominator": 279541132.014,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "02",
"matrixSize": [4, 4],
"scaleDenominator": 139770566.007,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "03",
"matrixSize": [8, 8],
"scaleDenominator": 69885283.0036,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "04",
"matrixSize": [16, 16],
"scaleDenominator": 34942641.5018,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "05",
"matrixSize": [32, 32],
"scaleDenominator": 17471320.7509,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "06",
"matrixSize": [64, 64],
"scaleDenominator": 8735660.37545,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "07",
"matrixSize": [128, 128],
"scaleDenominator": 4367830.18772,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "08",
"matrixSize": [256, 256],
"scaleDenominator": 2183915.09386,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "09",
"matrixSize": [512, 512],
"scaleDenominator": 1091957.54693,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "10",
"matrixSize": [1024, 1024],
"scaleDenominator": 545978.773466,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "11",
"matrixSize": [2048, 2048],
"scaleDenominator": 272989.386733,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "12",
"matrixSize": [4096, 4096],
"scaleDenominator": 136494.693366,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "13",
"matrixSize": [8192, 8192],
"scaleDenominator": 68247.3466832,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "14",
"matrixSize": [16384, 16384],
"scaleDenominator": 34123.6733416,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "15",
"matrixSize": [32768, 32768],
"scaleDenominator": 17061.8366708,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "16",
"matrixSize": [65536, 65536],
"scaleDenominator": 8530.9183354,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
},
{
"identifier": "17",
"matrixSize": [131072, 131072],
"scaleDenominator": 4265.4591677,
"tileSize": [256,256],
"topLeftCorner": [-20037508.3428,20037508.3428]
}
,{
"identifier": "18",
"matrixSize": [262144, 262144],
"scaleDenominator": 2132.72958385,
"tileSize": [256, 256],
"topLeftCorner": [-20037508.3428,20037508.3428]
}
],
"imageFormat": "png"
}
For the Legend implentation (HTML):
2 chemins possibles:
Avec le composant de legende: dans le fichier legend.jrxml
remplacer le champ text par un champ HTML:
<componentElement>
<reportElement x="0" y="20" width="780" height="75" uuid="8a897ef3-b2f1-4d88-ac08-f774acd5d5ff"/>
<hc:html xmlns:hc="http://jasperreports.sourceforge.net/htmlcomponent" xsi:schemaLocation="http://jasperreports.sourceforge.net/htmlcomponent http://jasperreports.sourceforge.net/xsd/htmlcomponent.xsd" scaleType="RetainShape" horizontalAlign="Left" verticalAlign="Middle">
<hc:htmlContentExpression><![CDATA[$F{name}]]></hc:htmlContentExpression>
</hc:html>
</componentElement>
Sois faire a peut près la même chose mais avec un champ de l'impression datasource:
attributes:
legend: !datasource
attributes:
html: !string {}
processors:
- !createDataSource
reportTemplate: table.jrxml
reportKey: reportTemplate
et dans table.jrxml:
<field name="html" class="java.lang.String"/>
<detail>
<band height="15" splitType="Immediate">
<componentElement>
<reportElement x="0" y="20" width="780" height="75" uuid="8a897ef3-b2f1-4d88-ac08-f774acd5d5ff"/>
<hc:html xmlns:hc="http://jasperreports.sourceforge.net/htmlcomponent" xsi:schemaLocation="http://jasperreports.sourceforge.net/htmlcomponent http://jasperreports.sourceforge.net/xsd/htmlcomponent.xsd" scaleType="RetainShape" horizontalAlign="Left" verticalAlign="Middle">
<hc:htmlContentExpression><![CDATA[$F{html}]]></hc:htmlContentExpression>
</hc:html>
</componentElement>
</band>
</detail>
</jasperReport>
As I see the on the code and in the print result the scale bar is made in luref, ... isn't also a measure issue ?
for the legend, will it work with our legends i.e. http://wiki.geoportail.lu/doku.php?id=fr:legend:tour_velo_national&do=export_html (there are relative paths to the images, that's why we insert them as iframe) in geoportailv3, the print legend function works fine, I don't know how it was implemented though
I don't understand your remark concerning the scale bar.
The map is in Webmercator, but we wan't the scale bar to be in luref as webmercator distances are distorted. How can I do this in the print config. I don't see where I could configure it
... ? the map is in EPSG:2169, is not in Google Mercator, than I think that's in LUREF isn't it ?
I was convinced that the map is in webmercator... that's why I used 3857 here: https://github.com/Geoportail-Luxembourg/geoportailv3/blob/master/print/print-apps/geoportailv3/requestData.json
But you are right, the map is in LUREF, so it will not be an issue. The only thing is that the print will have to use webmercator tiles in a luref map. is that possible?
It's not possible to include an iframe in a Jasper Report ... and I don't fount easy way to convert relative URL to absolute URL :-(
The only thing is that the print will have to use webmercator tiles in a luref map. is that possible?
I suspect that's not possible ...
I think we have to create two separate issues for projection and legends. OK?
ok :-)
scalebar problem solved thanks to this: https://github.com/mapfish/mapfish-print/pull/212 to be tested
WMTS issue solved thanks to this: https://github.com/mapfish/mapfish-print/pull/211
to be tested
WMTS and scalebar projection are OK with the newest snapshot
I can't get WMTS layers to work in REST - mode ..
According to the code here [1], I should put the entire templateURL (see below), but I get an AssertError:
Exception in thread "main" com.vividsolutions.jts.util.AssertionFailedException: invalid baseURL
I also get an "invalid baseURL" error:
2015-04-27 18:35:27,885 INFO [c2cgeoportal.views.proxy][Dummy-2] Send query to URL:
http://localhost:8080/print-elemoine/print/geoportailv3/report.pdf?.
2015-04-27 18:35:27,910 INFO [c2cgeoportal.views.proxy][Dummy-4] Send query to URL:
http://localhost:8080/print-elemoine/print/geoportailv3/status/07c39cbf-f56e-451a-9fce-3a488f6f9cc6@25e53915-203e-43f0-8500-a0a8fb6839a7.json?.
2015-04-27 18:35:28,929 INFO [c2cgeoportal.views.proxy][Dummy-5] Send query to URL:
http://localhost:8080/print-elemoine/print/geoportailv3/status/07c39cbf-f56e-451a-9fce-3a488f6f9cc6@25e53915-203e-43f0-8500-a0a8fb6839a7.json?.
2015-04-27 18:35:28,941 INFO [c2cgeoportal.views.proxy][Dummy-3] Send query to URL:
http://localhost:8080/print-elemoine/print/geoportailv3/report/07c39cbf-f56e-451a-9fce-3a488f6f9cc6@25e53915-203e-43f0-8500-a0a8fb6839a7?.
2015-04-27 18:35:28,945 ERROR [c2cgeoportal.views.proxy][Dummy-3] Error 'Internal Server Error' in response of URL:
http://localhost:8080/print-elemoine/print/geoportailv3/report/07c39cbf-f56e-451a-9fce-3a488f6f9cc6@25e53915-203e-43f0-8500-a0a8fb6839a7?.
2015-04-27 18:35:28,945 ERROR [c2cgeoportal.views.proxy][Dummy-3] Status: 500
2015-04-27 18:35:28,945 ERROR [c2cgeoportal.views.proxy][Dummy-3] Method: GET
2015-04-27 18:35:28,945 ERROR [c2cgeoportal.views.proxy][Dummy-3] --- With headers ---
Accept-Language: en-US,en;q=0.8,fr;q=0.6
Accept-Encoding: gzip, deflate, sdch
Host: localhost:5000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36
Connection: keep-alive
Referer: http://localhost:5000/?debug&version=3&zoom=15&X=681185&Y=6412222
Cache-Control: no-cache
2015-04-27 18:35:28,945 ERROR [c2cgeoportal.views.proxy][Dummy-3] --- Return content ---
2015-04-27 18:35:28,945 ERROR [c2cgeoportal.views.proxy][Dummy-3] Error while processing request:
com.vividsolutions.jts.util.AssertionFailedException: invalid baseURL
Does anyone know what the problem is?
This is the print spec my code sends: https://gist.github.com/elemoine/baf5d854b67828121ce4.
The change to WMTSLayer.java in https://github.com/mapfish/mapfish-print/commit/750a2611cf17ceab1a3fa9a0cea3b62662fcc1f7 looks suspicious to me, but I am not sure.
The change to WMTSLayer.java in mapfish/mapfish-print@750a261 looks suspicious to me, but I am not sure.
I realize that it's an old change, so the problem may be elsewhere… @sbrunner I think I'll need your help on this one.
I found the issue with the help of @tsauerwein. MapFish Print fails if the baseURL
includes {Layer}
. But it should not. We do send a "layer"
property in the WMTS layer spec, so MapFish Print should itself do the replace
. I'll create a MapFish Print issue for that.
Card for questions about print config
Restant c2c 01/04/2015 : 2j Restant c2c 01/05/2015 : 2j