[Qgis-developer] QGIS Web Client: problem with layers in different SRS

Andreas Neumann a.neumann at carto.net
Tue Jun 7 09:03:06 EDT 2011


 Hi Niccolo,

 I can explain how qgis webclient detects the max extent:

 * it picks the first layer it finds in the GetCapabilities and uses the 
 bounding box of this layer. In QGIS, in the WMS properties you can set 
 this bounding box and it means that all layers are written out in the 
 GetCapabilities with the same bounding box.

 When writing QGIS webclient I did not have to deal with different 
 projection in one QGIS project - so one could consider this a bug. QGIS 
 webclient should more intelligently calculate the bounding box.

 As a quick ugly fix, make sure that the first layer that appears in the 
 GetCapabilities is in the same CRS than the project CRS.

 You should also write a bug report at 
 http://hub.qgis.org/projects/qgis-web-client/

 Andreas

 On Tue, 7 Jun 2011 13:46:19 +0200, Niccolo Rigacci wrote:
> Hi,
>
> I have a QGIS project with two layers: one is EPSG:3003
> (metric, Italy) and the other EPSG:900913 (metric, Google).
> The whole project is in EPSG:3003.
>
> QGIS Mapserver works well: layers are correctly overlapped.
>
> The problem is with QGIS Web Client: the map extent is calculated
> without reprojecting, the 900913 layer prevails and "Zoom to the
> maximum map extent" gives a wrong result.
>
> What is the supposed fix to this problem?
>
> 1) Do not mix different SRS in the project
> 2) Let QGIS Web Client do the proper reprojection
>    (may be using OpenLayers.Map.displayProjection ?)
> 3) Force the map extent in GlobalOptions.js

-- 
 --
 Andreas Neumann
 Böschacherstrasse 10A
 8624 Grüt (Gossau ZH)
 Switzerland


More information about the Qgis-developer mailing list