[OpenLayers-Users] RE OL 2.13 and WMS from qgis-mapserver

Gaëtan Palka palka.gaetan at gmail.com
Mon Nov 25 00:57:12 PST 2013


Thank you for your help. It is a problem of projection and of WMS:
- my shapefile for WMS are not visible at a scale greater than 1/500000
when the EPSG = 4326. Why ? I do not know because I have not this problem
on windows
- so I reproject my data in EPSG 900913, create my WMS and force the
default projection of the map in 900913 and all is OK.

I only have now to use Proj4js to be able to use EPSG:2154 (French offical
projection) directly without having to reproject each shapefile in 900913.

Thank you very much !


2013/11/24 Richard Greenwood <richard.greenwood at gmail.com>

> Sounds like it might still be a projection issue because the base layer
> sets the projection in OpenLayers. Be sure that all your layers are in the
> same projection.
>
> Rich
>
>
> On Sat, Nov 23, 2013 at 11:26 AM, Gaëtan Palka <palka.gaetan at gmail.com>wrote:
>
>> Thank you, it is a mistake I did not correct (corected now) but it does
>> not totally correct the problem. If the isBaseLayer prameter is true, I can
>> see it but if it is false the tile stay white.
>>
>>
>> 2013/11/23 Richard Greenwood <richard.greenwood at gmail.com>
>>
>>> Just a guess, but I see two different coordinate systems in your WMS
>>> request:
>>>   900913 is web mercator
>>>   4326 is long/lat
>>> That does not look correct.
>>>
>>>  Rich
>>>
>>>
>>> On Sat, Nov 23, 2013 at 12:30 AM, Gaëtan Palka <palka.gaetan at gmail.com>wrote:
>>>
>>>> I continue my test to be able to shaw my WMS from qgis-server. I follow
>>>> :
>>>> http://live.osgeo.org/en/quickstart/openlayers_quickstart.html
>>>> but my tiles stay white. The resultat of :
>>>>
>>>> http://localhost/cgi-bin/alea37_900913/qgis_mapserv.fcgi?MAP=%2Fusr%2Flib%2Fcgi-bin%2Falea37_900913%2Falea37_900913.qgs&LAYERS=alea37_900913&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=0,-90,180,90&WIDTH=256&HEIGHT=256
>>>> The webbrowser give any error, only a white tile.
>>>>
>>>> Thank you for help
>>>>
>>>>
>>>> 2013/11/22 Gaëtan Palka <palka.gaetan at gmail.com>
>>>>
>>>>> I do not use mapserver and mapfile. I use "qgis-mapserver" which is
>>>>> the cartographic server of the qgis project. It will be easier to use
>>>>> mapserver but I need to have a really great precision form my
>>>>> representation. And qgis-server is exactly what I need.
>>>>>
>>>>>
>>>>> 2013/11/22 <Steve.Toutant at inspq.qc.ca>
>>>>>
>>>>>>
>>>>>> You can use shp2img to test your mapfile before using it in OL
>>>>>> http://mapserver.org/fr/utilities/shp2img.html
>>>>>>
>>>>>> set debug 5 under MAP and LAYER tag in your mafile and have a look at
>>>>>> mapserver log.
>>>>>>
>>>>>> If it works with shp2img the problem is your OL config
>>>>>>
>>>>>>
>>>>>>
>>>>>>  *Gaëtan Palka <palka.gaetan at gmail.com
>>>>>> <palka.gaetan at gmail.com>>@lists.osgeo.org <http://lists.osgeo.org>*
>>>>>> Envoyé par : openlayers-users-bounces at lists.osgeo.org
>>>>>>
>>>>>> 2013-11-22 13:12
>>>>>>   A
>>>>>> openlayers-users <openlayers-users at lists.osgeo.org>
>>>>>> cc
>>>>>>   Objet
>>>>>> [OpenLayers-Users] OL 2.13 and WMS from qgis-mapserver
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> hi,
>>>>>>
>>>>>> I work on Ubuntu 12.04 LTS and I want to show a WMS produced by
>>>>>> qgis-mapserver. All is OK want I open my WMS with qgis desktop but when I
>>>>>> want to show it with OL my WMS does not appear and firebug does not says
>>>>>> that there is an error.
>>>>>> Here my .js :
>>>>>>
>>>>>> function init() {
>>>>>>     var map = new OpenLayers.Map('map',{controls:[]});
>>>>>>
>>>>>>     map.addControl(new OpenLayers.Control.LayerSwitcher());
>>>>>>     map.addControl(new OpenLayers.Control.Navigation());
>>>>>>
>>>>>>     var osmLayer = new OpenLayers.Layer.OSM();
>>>>>>     var wms = new OpenLayers.Layer.WMS(
>>>>>>         'alea', '
>>>>>> *http://localhost/cgi-bin/alea37_900913/qgis_mapserv.fcgi*<http://localhost/cgi-bin/alea37_900913/qgis_mapserv.fcgi>
>>>>>> ',
>>>>>>         {
>>>>>>         layers: 'alea37_900913',
>>>>>>         format: 'image/png',
>>>>>>         }
>>>>>>     );
>>>>>>     map.addLayer(osmLayer);
>>>>>>     map.addLayer(wms);
>>>>>>     map.setCenter(new OpenLayers.LonLat(71000,6000000),10);
>>>>>>
>>>>>> }
>>>>>>
>>>>>> My data (shp and qgis project) is in the folder
>>>>>> /usr/lib/cgi-bin/alea37_900913.
>>>>>>
>>>>>> I used this tutorial :
>>>>>>
>>>>>> *http://anitagraser.com/2012/03/30/qgis-server-on-ubuntu-step-by-step/*<http://anitagraser.com/2012/03/30/qgis-server-on-ubuntu-step-by-step/>
>>>>>>
>>>>>> Thank you by advance for help.
>>>>>> _______________________________________________
>>>>>> Users mailing list
>>>>>> Users at lists.osgeo.org
>>>>>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>>>
>>>
>>>
>>>
>>> --
>>> Richard Greenwood
>>> richard.greenwood at gmail.com
>>> www.greenwoodmap.com
>>>
>>
>>
>
>
> --
> Richard Greenwood
> richard.greenwood at gmail.com
> www.greenwoodmap.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20131125/9d2710ee/attachment.html>


More information about the Users mailing list