Closed marionb closed 6 years ago
I'm not sure if the error is in Openlayers or in MapFish Print.
In the example below, I've made a text with some different value. Each time, we set the haloradius
of MapFish Print with the stroke
value from ol3.
the report spec:
The OpenLayers ("on web") result
The MapFish Print ("on pdf") result:
(Permalink parameters to reproduce the text: ?debug&lang=en&baselayer_ref=OSM map&tree_group_layers_Transport&rl_features=Fa(hc8yGkvyg!.1n9-hxO..zm9-~rtrue'nRectangle%25201'c%2523DB4436'a0'o0.25'mfalse's10'k1.5)p(9bjyG3n2j!~ttrue'nStroke%2520value%2520%253D%25201'c%2523000000'a0'o0.2'mfalse's10'k1)p(15jyGkjwh!~ttrue'nStroke%2520value%2520%253D%25202'c%2523000000'a0'o0.2'mfalse's10'k2)p(9bjyG3xph!~ttrue'nStroke%2520value%2520%253D%25203'c%2523000000'a0'o0.2'mfalse's10'k3)p(9bjyG3beh!~ttrue'nStroke%2520value%2520%253D%25204'c%2523000000'a0'o0.2'mfalse's10'k4)p(hhjyGkb5h!~ttrue'nStroke%2520value%2520%253D%25205'c%2523000000'a0'o0.2'mfalse's10'k5)&map_x=627801&map_y=183958&map_zoom=4&tree_groups=Transport)
Stroke is slightly different. Text size is also slightly different (see the length of the text compared to the size of my red square). Probably due to the Font.
Nothing to do in NGEO I think.
@sbrunner What should we do with this issue ? (I think, that concern more MapFish Print)
Are we sure that's an issue in mapfish print, and not in openlayers?
In OpenLayers, we want a stroke of 3 pixels, we get a stroke of 3 pixels.
In MapFish Print, 3 pixels is not 3 pixels, OR the value "3" doesn't use the unit "pixel*. I don't know, I don't see any mention to the unit they use in the documentation: http://mapfish.github.io/mapfish-print-doc/styles.html#haloproperties
OK, then it should be reported on MapfishPrint
Thanks :-)
IMHO, the problem is in ngeo:
To me, https://github.com/camptocamp/ngeo/blob/master/src/services/print.js#L790 should be:
symbolizer.haloRadius = width / 2.0;
ping @ger-benjamin what do you think about this?
Make sens. I'll re-open this issue and close the other
Done
Project:
Permalink directly where we can reproduce the issue:
Steps to reproduce the issue:
Result: Text elements are rendered with a buffer that is too large compared to what we actually see on the map.
Expected result: The print should look like what we see on the map. With a smaller buffer.
The issue concern the following environment:
The following environment is working as expected: