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

Gaëtan Palka palka.gaetan at gmail.com
Fri Nov 22 10:12:55 PST 2013


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',
        {
        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/

Thank you by advance for help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20131122/24c77597/attachment.html>


More information about the Users mailing list