[Qgis-user] Fwd: wrong scale printing with qgis web client
Enrico Ferreguti
enricofer at gmail.com
Thu Dec 3 08:15:50 PST 2015
Thanks Tom.
I downloaded and patched GeoExt as you suggest, I customized it to fit to
my needs modifying these rows:
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
var projDest = 'EPSG:3857';
var p1 = {
x: 1725491,
y: 5031855
};
the destination but I get a "proj4 is not a function" TypeError on row 329
in browser console
Proj4 lib should already be imported...
Any Help?
2015-12-03 14:31 GMT+01:00 Tom Palan <thomas at palan.at>:
> hi,
>
> 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).
> I works like this:
>
> - 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.
> - 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.
>
> 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.
>
> Another downside: I have to use the debug-version of GeoExt and not the
> single file version.
>
> Tom
>
> On Thu, Dec 03, 2015 at 12:34:53PM +0100, Enrico Ferreguti wrote:
> > Well, I made some checks....
> > I verified that, using osm backgound layers, all projects were
> reprojected
> > to epsg:3857 from epsg:3003.
> > Setting (in GlobalOptions.js) all background layer to false and authid
> > accordingly with project authid (epsg:3003) I verified that I get now
> right
> > scaled maps (the right scaled pdf is attached).
> > Then I confirm that the wrong behaviour (as from Tom email)
> >
> > > happens when projection is set to EPSG3857 for using
> > > Google,OSM,...basemaps, and your data is in another projection.
> > >
> >
> > Qgis server version is 2.10 running under ubuntu.
> >
> > I would suggest Tom to share GeoExt patch!
> >
> > Regards.
> >
> > 2015-12-02 12:20 GMT+01:00 Bernhard Ströbl <bernhard.stroebl at jena.de>:
> >
> > > Hi Enrico,
> > >
> > > the scalebar on the pdf obviously does not fit the numerical scale.
> > > Questions:
> > > 1) First we have to determine, if a) the numerical scale is wrong but
> the
> > > scalebar is correct or b) vice versa. What happens if you print out the
> > > same Layout in the same project from QGIS desktop in scale 1:1000?
> Does the
> > > scalebar fit the numerical scale? Is the displayed map extent the same?
> > > 2) What projection(s) do you use?
> > > 3) Which version of QGIS server are you running?
> > >
> > > Bernhard
> > >
> > >
> > > Am 02.12.2015 um 11:54 schrieb Enrico Ferreguti:
> > >
> > >> Hi,
> > >> I'm getting prints with wrong scale from qgis web client.
> > >> Apparently everything is fine, I select the layout, the scale from the
> > >> select box, I place the bounding box in the map and then I print. The
> > >> layout contains a numeric scalebar that correclty reports the selected
> > >> scale but if I manually measure on paper the printed image appears
> that
> > >> the map has a wrong scale by a 1.43x factor
> > >>
> > >> I verified the behaviour with different projects and projections on
> > >> various servers.
> > >>
> > >> Should I open a ticket or Am I doing something wrong?
> > >>
> > >> Attached there is a print with wrong graphical and numeric scalebars.
> > >> The location is the following:
> > >> http://www.openstreetmap.org/#map=19/45.3963826129/11.8795777003
> > >>
> > >> Regards.
> > >> Enrico Ferreguti
> > >>
> > >>
> > >> _______________________________________________
> > >> Qgis-user mailing list
> > >> Qgis-user at lists.osgeo.org
> > >> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> > >> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> > >>
> > >>
> > >
> > >
> > > __________ Information from ESET Mail Security, version of virus
> signature
> > > database 12658 (20151202) __________
> > >
> > > The message was checked by ESET Mail Security.
> > > http://www.eset.com
> > >
> > >
> > >
> > > _______________________________________________
> > > Qgis-user mailing list
> > > Qgis-user at lists.osgeo.org
> > > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> > > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> > >
>
>
>
> --
> Tom Palan
> palan3 IT solutions OG
> Grillenbergstr. 4
> A-4407 Dietach
> Tel.: +43 (0) 680 3280940
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20151203/a3f85615/attachment.html>
More information about the Qgis-user
mailing list