[Qgis-developer] qgis-web-client Map extent

Bastian Rixen BastianR01 at web.de
Mon Aug 8 11:15:38 EDT 2011


Hello

Let me tell the problem in English again.
I want to try out qgis-web-client for a webmapping project. For the setup I sticked closely to the readme.txt and so far it is working in general.
The only problem I face so far is the zoom level when the client is started. If I open the QIS Projekt (the standard NaturalEarth example so far) through the web-client the map is zoomed out very far and earth is just a small rectangle in the map window.
I thought that it actually should zoom automatically to the last map extent used in the respective qgis project.
Anyone any ideas how to achieve that?

Thanks for the answer Andreas. The Full Extent Button works, but if you have a map of Europe or Germany in the background and you actually want to display layers for just a small area it won't be of much use.
If the qgis-web-client could read out the extent information form the project file and zoom to it, that would be perfect and someone told me that this actually the way it was intended to work.

Greetings

Bastian




-----Ursprüngliche Nachricht-----
Von: "Andreas Neumann" <a.neumann at carto.net>
Gesendet: 08.08.2011 13:40:47
An: qgis-developer at lists.osgeo.org
Betreff: Re: [Qgis-developer] qgis-web-client Zoomstufen/Kartenausdehnung

> Hi Bastian,
>
> I advise you to use english on this mailing-list.
>
> The exact dependency between zoom level, minScale, maxScale, minExtent
> and maxExtent in OpenLayers is a bit complicated and to be honest I
> never fully understood it. I also do not understand why OpenLayers needs
> a zoom level if one uses WMS untiled.
>
> In the file GlobalOptions you can set "maxScale" and "minScale" in the
> "MapOptions". In addition, QGIS web client reads the maxExtent from the
> bounding box of the first layer it hits (which is derived from the WMS
> settings in the QGIS project properties WMS tab. To be honest I never
> fully understood why one cannot simply set a zoom Extent in OpenLayers -
> it somehow gives precedence to some other zoom level or scale settings.
> You can try experimenting with these values and if you find out
> something we can fix it in QGIS web client.
>
> BTW: is the "Full Extent" Button working properly? This one usually
> works fine for me.
>
> Andreas
>
> On Mon, 8 Aug 2011 11:29:18 +0200 (CEST), wrote:
>> Hallo
>>
>> Ich nutze QGIS mapserver und QGIS-Web-Client unter Ubuntu. Bei der
>> Enrichtung des web-client habe ich mich an die Angaben der readme.txt
>> gehalten und es funktioniert soweit auch grundsätzlich. Zum Testen
>> nutze ich das Standard QGIS Projekt NaturalEarth. Beim Aufrufen des
>> clients über den Browser wird aber leider immer sehr weit
>> hinausgezoomt, so dass die gesamte Erde als kleines Rechteck im
>> Kartenfenster erscheint. Es sollte aber eigentlich so sein, dass
>> direkt der zu letzt gewählte Kartenausschnitt des jeweiligen
>> QGIS-Projekts dargestellt wird.
>>
>> Wie stellt man das ein? In QGIS habe ich unter
>> Projekteigenschaften/WMS Server das Häckchen bei 'Angezeigte
>> Ausmasse' gesetzt, was aber keinen Effekt hatte.
>> In der GlobalOptions.js oder der GUI.js habe ich auch keinen Hinweis
>> auf die Zoomstufen usw. gefunden.
>>
>> Ich hoffe jemand kann mir da weiterhelfen.
>>
>> Vielen Dank für alle Antworten
>>
>> Schöne Grüße
>>
>> Bastian
>>
>> Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
>> Toolbar eingebaut! HTTP://PRODUKTE.WEB.DE/GO/TOOLBAR [1]
>>
>>
>>
>> Links:
>> ------
>> [1] http://produkte.web.de/go/toolbar
>
>--
> --
> Andreas Neumann
> Böschacherstrasse 10A
> 8624 Grüt (Gossau ZH)
> Switzerland
>_______________________________________________
>Qgis-developer mailing list
>Qgis-developer at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/qgis-developer


___________________________________________________________
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar


More information about the Qgis-developer mailing list