Discussion:
[Qgis-user] QGIS Web Client with Google Background Maps works only in EPSG 3857
Markus Weidenbach
2014-06-25 11:05:33 UTC
Permalink
Dear List,

I am running QWC on a Remote Debian 7 (QWC checkout from GIT HUB on
25.06.2014) and on a local Win 7 (checkout in Marc 2014) computer.

I would like to publish my QGIS projects in its original CRS, which is
EPSG 31467 together with the Google Satellite/Street Background Maps.
So, I changed the "var authid" in the GlobalOption.js from 3857 to 31467
(and I also added the missing EPSG31467 record to the libs/proj4js/defs).

After many attempts, I found that the Background Maps work only when you
set var authid="EPSG"+3857 in GlobalOptions.js.

Consequently I can publish QGIS projects in EPSG31647 after switching
the "var authid" to EPSG 31467 only if I switch off the Google
Background Maps (in GlobalOptions.js with var enableBGMaps = false;) at
the same time.

Can anybody confirm this?
Or is there a setting to tell the Background Maps to transform
automatically into the EPSG given in the "authid" variable?

Thanks for any comments.

Markus

N.B.
I know, that I could save my QGIS projects in EPSG3857 to publish them
in QWC together with the Background Maps, but then I am loosing the
original coordinates and this also leads to some geometrical inaccuracies.
--
Dr. Markus Weidenbach
*landConsult.de*
Geographical Information Management
and Environmental Planning
D-77815 B?hl
Germany
e.mail see: http://landConsult.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140625/41c5979e/attachment.html>
Bernhard Ströbl
2014-06-25 11:16:10 UTC
Permalink
Hi,

GoogleMaps is only available in GoogleMercator projection (3857), so if
you want to use them you have to use this projection (in which case I
would recommend to also reproject your data for the server, so QWC, the
QGIS project and the data are in the same projection.)
BTW: The GoogleMap is also not included in the print.

Bernhard
Post by Markus Weidenbach
Dear List,
I am running QWC on a Remote Debian 7 (QWC checkout from GIT HUB on
25.06.2014) and on a local Win 7 (checkout in Marc 2014) computer.
I would like to publish my QGIS projects in its original CRS, which is
EPSG 31467 together with the Google Satellite/Street Background Maps.
So, I changed the "var authid" in the GlobalOption.js from 3857 to 31467
(and I also added the missing EPSG31467 record to the libs/proj4js/defs).
After many attempts, I found that the Background Maps work only when you
set var authid="EPSG"+3857 in GlobalOptions.js.
Consequently I can publish QGIS projects in EPSG31647 after switching
the "var authid" to EPSG 31467 only if I switch off the Google
Background Maps (in GlobalOptions.js with var enableBGMaps = false;) at
the same time.
Can anybody confirm this?
Or is there a setting to tell the Background Maps to transform
automatically into the EPSG given in the "authid" variable?
Thanks for any comments.
Markus
N.B.
I know, that I could save my QGIS projects in EPSG3857 to publish them
in QWC together with the Background Maps, but then I am loosing the
original coordinates and this also leads to some geometrical inaccuracies.
--
Dr. Markus Weidenbach
*landConsult.de*
Geographical Information Management
and Environmental Planning
D-77815 B?hl
Germany
e.mail see: http://landConsult.de
__________ Information from ESET Mail Security, version of virus signature database 9997 (20140625) __________

The message was checked by ESET Mail Security.
http://www.eset.com
Markus Weidenbach
2014-06-25 12:02:23 UTC
Permalink
Thanks, Bernhard and Giovanni for the quick response.

Bernhard, unfortunately the project is pretty complex and it is too much
work to reproject all data sets into the EPSG 3857 just for publishing
(the perfect integration of QGIS Mapserver and QGIS, allowing the direct
publication of QGIS projects with no extra work was the main reason for
me to choose QGIS Mapserver/QWC).
So, either I had to use my own reprojected background map or do
everything in EPSG3857 .....
:-\

Alternatively I could use one of the regional and public WMS which
serves 40 cm Orthos also in EPSG31467 and which I could use as
background information.
Do you know if there is a way to attach such WMS to the QWC?

Regards,
Markus
--
Dr. Markus Weidenbach
*landConsult.de*
Geographical Information Management
and Environmental Planning
D-77815 B?hl
Germany
e.mail see: http://landConsult.de
Post by Bernhard Ströbl
Hi,
GoogleMaps is only available in GoogleMercator projection (3857), so
if you want to use them you have to use this projection (in which case
I would recommend to also reproject your data for the server, so QWC,
the QGIS project and the data are in the same projection.)
BTW: The GoogleMap is also not included in the print.
Bernhard
Post by Markus Weidenbach
Dear List,
I am running QWC on a Remote Debian 7 (QWC checkout from GIT HUB on
25.06.2014) and on a local Win 7 (checkout in Marc 2014) computer.
I would like to publish my QGIS projects in its original CRS, which is
EPSG 31467 together with the Google Satellite/Street Background Maps.
So, I changed the "var authid" in the GlobalOption.js from 3857 to 31467
(and I also added the missing EPSG31467 record to the
libs/proj4js/defs).
After many attempts, I found that the Background Maps work only when you
set var authid="EPSG"+3857 in GlobalOptions.js.
Consequently I can publish QGIS projects in EPSG31647 after switching
the "var authid" to EPSG 31467 only if I switch off the Google
Background Maps (in GlobalOptions.js with var enableBGMaps = false;) at
the same time.
Can anybody confirm this?
Or is there a setting to tell the Background Maps to transform
automatically into the EPSG given in the "authid" variable?
Thanks for any comments.
Markus
N.B.
I know, that I could save my QGIS projects in EPSG3857 to publish them
in QWC together with the Background Maps, but then I am loosing the
original coordinates and this also leads to some geometrical
inaccuracies.
--
Dr. Markus Weidenbach
*landConsult.de*
Geographical Information Management
and Environmental Planning
D-77815 B?hl
Germany
e.mail see: http://landConsult.de
__________ Information from ESET Mail Security, version of virus
signature database 9997 (20140625) __________
The message was checked by ESET Mail Security.
http://www.eset.com
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140625/ce0f6102/attachment-0001.html>
Bernhard Ströbl
2014-06-25 12:47:01 UTC
Permalink
Hi Markus,
Post by Markus Weidenbach
Thanks, Bernhard and Giovanni for the quick response.
Bernhard, unfortunately the project is pretty complex and it is too much
work to reproject all data sets into the EPSG 3857 just for publishing
(the perfect integration of QGIS Mapserver and QGIS, allowing the direct
publication of QGIS projects with no extra work was the main reason for
me to choose QGIS Mapserver/QWC).
I _think_ that otf reprojection of all your layers increases the
answering time of your server when requesting maps in EPSG:3857.
Post by Markus Weidenbach
So, either I had to use my own reprojected background map or do
everything in EPSG3857 .....
:-\
Alternatively I could use one of the regional and public WMS which
serves 40 cm Orthos also in EPSG31467 and which I could use as
background information.
Do you know if there is a way to attach such WMS to the QWC?
Yes you can. You can either load a WMS layer into your project (so
called cascading WMS). Thus this layer is printable. Or you can
configure it as background layer (a OpenLayers.layer.WMS object see the
OpenLayers documentation on how to do that).
I do this in Customizations.js:

function customBeforeMapInit() {
var myBackgroundLayer = new OpenLayers.Layer.WMS("myName",
"myURL", {
layers: "myLayer",
format: format,
dpi: screenDpi,
VERSION: "1.3.0"
},
{
buffer:0,
singleTile:true,
ratio:1,
transitionEffect:"resize",
isBaseLayer: true,
projection:authid
}
);
baseLayers.push(myBackgroundLayer);
}

Bernhard
Post by Markus Weidenbach
Regards,
Markus
--
Dr. Markus Weidenbach
*landConsult.de*
Geographical Information Management
and Environmental Planning
D-77815 B?hl
Germany
e.mail see: http://landConsult.de
Post by Bernhard Ströbl
Hi,
GoogleMaps is only available in GoogleMercator projection (3857), so
if you want to use them you have to use this projection (in which case
I would recommend to also reproject your data for the server, so QWC,
the QGIS project and the data are in the same projection.)
BTW: The GoogleMap is also not included in the print.
Bernhard
Post by Markus Weidenbach
Dear List,
I am running QWC on a Remote Debian 7 (QWC checkout from GIT HUB on
25.06.2014) and on a local Win 7 (checkout in Marc 2014) computer.
I would like to publish my QGIS projects in its original CRS, which is
EPSG 31467 together with the Google Satellite/Street Background Maps.
So, I changed the "var authid" in the GlobalOption.js from 3857 to 31467
(and I also added the missing EPSG31467 record to the
libs/proj4js/defs).
After many attempts, I found that the Background Maps work only when you
set var authid="EPSG"+3857 in GlobalOptions.js.
Consequently I can publish QGIS projects in EPSG31647 after switching
the "var authid" to EPSG 31467 only if I switch off the Google
Background Maps (in GlobalOptions.js with var enableBGMaps = false;) at
the same time.
Can anybody confirm this?
Or is there a setting to tell the Background Maps to transform
automatically into the EPSG given in the "authid" variable?
Thanks for any comments.
Markus
N.B.
I know, that I could save my QGIS projects in EPSG3857 to publish them
in QWC together with the Background Maps, but then I am loosing the
original coordinates and this also leads to some geometrical
inaccuracies.
--
Dr. Markus Weidenbach
*landConsult.de*
Geographical Information Management
and Environmental Planning
D-77815 B?hl
Germany
e.mail see: http://landConsult.de
__________ Information from ESET Mail Security, version of virus signature database 9998 (20140625) __________

The message was checked by ESET Mail Security.
http://www.eset.com
Markus Weidenbach
2014-06-25 14:48:05 UTC
Permalink
Thanks Bernhard,

I succeeded to add an external WMS in EPSG31467 to the QWC via the QGIS
Project (and it works in both QWC settings, with authid=3857 and with
authid=31467). So, including your description for the Background Layer
in Java, there are quite a few solutions I can try!

Regards,

Markus
--
Dr. Markus Weidenbach
*landConsult.de*
Geographical Information Management
and Environmental Planning
D-77815 B?hl
Germany
e.mail see: http://landConsult.de
Post by Bernhard Ströbl
Hi Markus,
Post by Markus Weidenbach
Thanks, Bernhard and Giovanni for the quick response.
Bernhard, unfortunately the project is pretty complex and it is too much
work to reproject all data sets into the EPSG 3857 just for publishing
(the perfect integration of QGIS Mapserver and QGIS, allowing the direct
publication of QGIS projects with no extra work was the main reason for
me to choose QGIS Mapserver/QWC).
I _think_ that otf reprojection of all your layers increases the
answering time of your server when requesting maps in EPSG:3857.
Post by Markus Weidenbach
So, either I had to use my own reprojected background map or do
everything in EPSG3857 .....
:-\
Alternatively I could use one of the regional and public WMS which
serves 40 cm Orthos also in EPSG31467 and which I could use as
background information.
Do you know if there is a way to attach such WMS to the QWC?
Yes you can. You can either load a WMS layer into your project (so
called cascading WMS). Thus this layer is printable. Or you can
configure it as background layer (a OpenLayers.layer.WMS object see
the OpenLayers documentation on how to do that).
function customBeforeMapInit() {
var myBackgroundLayer = new OpenLayers.Layer.WMS("myName",
"myURL", {
layers: "myLayer",
format: format,
dpi: screenDpi,
VERSION: "1.3.0"
},
{
buffer:0,
singleTile:true,
ratio:1,
transitionEffect:"resize",
isBaseLayer: true,
projection:authid
}
);
baseLayers.push(myBackgroundLayer);
}
Bernhard
Post by Markus Weidenbach
Regards,
Markus
--
Dr. Markus Weidenbach
*landConsult.de*
Geographical Information Management
and Environmental Planning
D-77815 B?hl
Germany
e.mail see: http://landConsult.de
Post by Bernhard Ströbl
Hi,
GoogleMaps is only available in GoogleMercator projection (3857), so
if you want to use them you have to use this projection (in which case
I would recommend to also reproject your data for the server, so QWC,
the QGIS project and the data are in the same projection.)
BTW: The GoogleMap is also not included in the print.
Bernhard
Post by Markus Weidenbach
Dear List,
I am running QWC on a Remote Debian 7 (QWC checkout from GIT HUB on
25.06.2014) and on a local Win 7 (checkout in Marc 2014) computer.
I would like to publish my QGIS projects in its original CRS, which is
EPSG 31467 together with the Google Satellite/Street Background Maps.
So, I changed the "var authid" in the GlobalOption.js from 3857 to 31467
(and I also added the missing EPSG31467 record to the
libs/proj4js/defs).
After many attempts, I found that the Background Maps work only when you
set var authid="EPSG"+3857 in GlobalOptions.js.
Consequently I can publish QGIS projects in EPSG31647 after switching
the "var authid" to EPSG 31467 only if I switch off the Google
Background Maps (in GlobalOptions.js with var enableBGMaps = false;) at
the same time.
Can anybody confirm this?
Or is there a setting to tell the Background Maps to transform
automatically into the EPSG given in the "authid" variable?
Thanks for any comments.
Markus
N.B.
I know, that I could save my QGIS projects in EPSG3857 to publish them
in QWC together with the Background Maps, but then I am loosing the
original coordinates and this also leads to some geometrical inaccuracies.
--
Dr. Markus Weidenbach
*landConsult.de*
Geographical Information Management
and Environmental Planning
D-77815 B?hl
Germany
e.mail see: http://landConsult.de
__________ Information from ESET Mail Security, version of virus
signature database 9998 (20140625) __________
The message was checked by ESET Mail Security.
http://www.eset.com
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140625/f8b9cd67/attachment.html>
G. Allegri
2014-06-25 11:17:29 UTC
Permalink
To overlay your data on a Google/Bing basemap a reprojection is
unavoidable. If your project's OWS options publish the CRS 3857, QGIS
server should reproject your layer on the fly. Doesn't it?

giovanni
Dear List,

I am running QWC on a Remote Debian 7 (QWC checkout from GIT HUB on
25.06.2014) and on a local Win 7 (checkout in Marc 2014) computer.

I would like to publish my QGIS projects in its original CRS, which is EPSG
31467 together with the Google Satellite/Street Background Maps.
So, I changed the "var authid" in the GlobalOption.js from 3857 to 31467
(and I also added the missing EPSG31467 record to the libs/proj4js/defs).

After many attempts, I found that the Background Maps work only when you
set var authid="EPSG"+3857 in GlobalOptions.js.

Consequently I can publish QGIS projects in EPSG31647 after switching the
"var authid" to EPSG 31467 only if I switch off the Google Background Maps
(in GlobalOptions.js with var enableBGMaps = false;) at the same time.

Can anybody confirm this?
Or is there a setting to tell the Background Maps to transform
automatically into the EPSG given in the "authid" variable?

Thanks for any comments.

Markus

N.B.
I know, that I could save my QGIS projects in EPSG3857 to publish them in
QWC together with the Background Maps, but then I am loosing the original
coordinates and this also leads to some geometrical inaccuracies.
--
Dr. Markus Weidenbach
*landConsult.de*
Geographical Information Management
and Environmental Planning
D-77815 B?hl
Germany
e.mail see: http://landConsult.de

_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140625/9a426e15/attachment.html>
Loading...