<div dir="ltr"><div><div><div><div><div>hi,<br><br></div>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.<br>
</div>Here my .js :<br><br>function init() {<br> var map = new OpenLayers.Map('map',{controls:[]});<br><br> map.addControl(new OpenLayers.Control.LayerSwitcher());<br> map.addControl(new OpenLayers.Control.Navigation());<br>
<br> var osmLayer = new OpenLayers.Layer.OSM();<br> var wms = new OpenLayers.Layer.WMS(<br> 'alea', '<a href="http://localhost/cgi-bin/alea37_900913/qgis_mapserv.fcgi">http://localhost/cgi-bin/alea37_900913/qgis_mapserv.fcgi</a>',<br>
{<br> layers: 'alea37_900913',<br> format: 'image/png',<br> }<br> );<br> map.addLayer(osmLayer);<br> map.addLayer(wms);<br> map.setCenter(new OpenLayers.LonLat(71000,6000000),10);<br>
<br>}<br><br></div>My data (shp and qgis project) is in the folder /usr/lib/cgi-bin/alea37_900913.<br><br></div>I used this tutorial :<br><a href="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/</a><br>
<br></div>Thank you by advance for help.<br></div>