<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div><div><div>Thanks Tom.<br></div><br></div>I downloaded and patched GeoExt as you suggest, I customized it to fit to my needs modifying these rows:<br><br><div style="margin-left:40px">        var projSrc = "+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +units=m +no_defs"; // EPSG:3003<br>        var projDest = 'EPSG:3857';<br>        <br>        var p1 = {<br>          x: 1725491,<br>          y: 5031855<br>        };<br></div><br>the destination but I get a "proj4 is not a function" TypeError on row 329   in browser console<br><br></div>Proj4 lib should already be imported...<br><br></div>Any Help?<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-12-03 14:31 GMT+01:00 Tom Palan <span dir="ltr"><<a href="mailto:thomas@palan.at" target="_blank">thomas@palan.at</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hi,<br>
<br>
included you find my patch...It is very specific to my application (using EPSG:31225 austrian projection, and a reference point in the middle of Austria).<br>
I works like this:<br>
<br>
- I choose a point of reference (in EPSG:31255), and add the width and height of the needed print bounding-box as a second point.<br>
- then I project both points into EPSG:3857 (using the proj4-library), and subtract these 2 points to get the widht and height of the resulting bounding-box.<br>
<br>
I have to admin I do not know enough about projections to judge if this could be made simpler...I think this is just symptom-control, there must be a better solution to this.<br>
<br>
Another downside: I have to use the debug-version of GeoExt and not the single file version.<br>
<span><font color="#888888"><br>
Tom<br>
</font></span><div><div><br>
On Thu, Dec 03, 2015 at 12:34:53PM +0100, Enrico Ferreguti wrote:<br>
> Well, I made some checks....<br>
> I verified that, using osm backgound layers, all projects were reprojected<br>
> to epsg:3857 from epsg:3003.<br>
> Setting (in GlobalOptions.js) all background layer to false and authid<br>
> accordingly with project authid (epsg:3003) I verified that I get now right<br>
> scaled maps (the right scaled pdf is attached).<br>
> Then I confirm that the wrong behaviour (as from Tom email)<br>
><br>
> >  happens when projection is set to EPSG3857 for using<br>
> > Google,OSM,...basemaps, and your data is in another projection.<br>
> ><br>
><br>
> Qgis server version is 2.10 running under ubuntu.<br>
><br>
> I would suggest Tom to share GeoExt patch!<br>
><br>
> Regards.<br>
><br>
> 2015-12-02 12:20 GMT+01:00 Bernhard Ströbl <<a href="mailto:bernhard.stroebl@jena.de" target="_blank">bernhard.stroebl@jena.de</a>>:<br>
><br>
> > Hi Enrico,<br>
> ><br>
> > the scalebar on the pdf obviously does not fit the numerical scale.<br>
> > Questions:<br>
> > 1) First we have to determine, if a) the numerical scale is wrong but the<br>
> > scalebar is correct or b) vice versa. What happens if you print out the<br>
> > same Layout in the same project from QGIS desktop in scale 1:1000? Does the<br>
> > scalebar fit the numerical scale? Is the displayed map extent the same?<br>
> > 2) What projection(s) do you use?<br>
> > 3) Which version of QGIS server are you running?<br>
> ><br>
> > Bernhard<br>
> ><br>
> ><br>
> > Am 02.12.2015 um 11:54 schrieb Enrico Ferreguti:<br>
> ><br>
> >> Hi,<br>
> >> I'm getting prints with wrong scale from qgis web client.<br>
> >> Apparently everything is fine, I select the layout, the scale from the<br>
> >> select box, I place the bounding box in the map and then I print. The<br>
> >> layout contains a numeric scalebar that correclty reports the selected<br>
> >> scale but if I manually measure on paper the printed image appears that<br>
> >> the map has a wrong scale by a 1.43x factor<br>
> >><br>
> >> I verified the behaviour with different projects and projections on<br>
> >> various servers.<br>
> >><br>
> >> Should I open a ticket or Am I doing something wrong?<br>
> >><br>
> >> Attached there is a print with wrong graphical and numeric scalebars.<br>
> >> The location is the following:<br>
> >> <a href="http://www.openstreetmap.org/#map=19/45.3963826129/11.8795777003" rel="noreferrer" target="_blank">http://www.openstreetmap.org/#map=19/45.3963826129/11.8795777003</a><br>
> >><br>
> >> Regards.<br>
> >> Enrico Ferreguti<br>
> >><br>
> >><br>
> >> _______________________________________________<br>
> >> Qgis-user mailing list<br>
> >> <a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
> >> List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
> >> Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
> >><br>
> >><br>
> ><br>
> ><br>
> > __________ Information from ESET Mail Security, version of virus signature<br>
> > database 12658 (20151202) __________<br>
> ><br>
> > The message was checked by ESET Mail Security.<br>
> > <a href="http://www.eset.com" rel="noreferrer" target="_blank">http://www.eset.com</a><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Qgis-user mailing list<br>
> > <a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
> > List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
> > Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
> ><br>
<br>
<br>
<br>
</div></div><div><div>--<br>
Tom Palan<br>
palan3 IT solutions OG<br>
Grillenbergstr. 4<br>
A-4407 Dietach<br>
Tel.: <a href="tel:%2B43%20%280%29%20680%203280940" value="+436803280940" target="_blank">+43 (0) 680 3280940</a><br>
</div></div></blockquote></div><br></div>
</div></div></div><br></div>