Sorry for previous mail.<br><br>layer1 = new OpenLayers.Layer.WMS( &quot;QGIS-MAP&quot;,&quot;<a href="http://localhost/cgi-bin/mapserv.exe">http://localhost/cgi-bin/mapserv.exe</a>&quot;, {layers: &#39;ResidentDistrict_2011&#39;,map: &#39;/wwwroot/example1_test/Canada_Mountains.map&#39;,} )<br>
<br>layer2 = new OpenLayers.Layer.WMS( &quot;QGIS-MAP&quot;,&quot;<a href="http://localhost/cgi-bin/mapserv.exe">http://localhost/cgi-bin/mapserv.exe</a>&quot;, {layers: &#39;LAKES&#39;,map: &#39;/wwwroot/example1_test/Canada_Mountains.map&#39;,} )<br>
<br>layer3 = new OpenLayers.Layer.WMS( &quot;QGIS-MAP&quot;,&quot;<a href="http://localhost/cgi-bin/mapserv.exe">http://localhost/cgi-bin/mapserv.exe</a>&quot;, {layers: &#39;MDI_2011&#39;,map: &#39;/wwwroot/example1_test/Canada_Mountains.map&#39;,} )<br>
<br>map.addLayers([layer1,layer2,layer3]);<br><br>with regards<br>Venkat<br><br><br><div class="gmail_quote">On Mon, Apr 9, 2012 at 9:51 AM, Venkat Shesu Reddem <span dir="ltr">&lt;<a href="mailto:venkat.shesu@gmail.com">venkat.shesu@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Friend,<br><br>This may be help you.<br>..................<br>.................<br>layer = new OpenLayers.Layer.WMS( &quot;QGIS-MAP&quot;,&quot;<a href="http://localhost/cgi-bin/mapserv.exe" target="_blank">http://localhost/cgi-bin/mapserv.exe</a>&quot;, {layers: &#39;ResidentDistrict_2011&#39;,map: &#39;/wwwroot/example1_test/Canada_Mountains.map&#39;,} )<br>

<br>layer = new OpenLayers.Layer.WMS( &quot;QGIS-MAP&quot;,&quot;<a href="http://localhost/cgi-bin/mapserv.exe" target="_blank">http://localhost/cgi-bin/mapserv.exe</a>&quot;, {layers: &#39;LAKES&#39;,map: &#39;/wwwroot/example1_test/Canada_Mountains.map&#39;,} )<br>

<br>layer = new OpenLayers.Layer.WMS( &quot;QGIS-MAP&quot;,&quot;<a href="http://localhost/cgi-bin/mapserv.exe" target="_blank">http://localhost/cgi-bin/mapserv.exe</a>&quot;, {layers: &#39;MDI_2011&#39;,map: &#39;/wwwroot/example1_test/Canada_Mountains.map&#39;,} )<br>

<br>map.addLayers([ResidentDistrict_2011, LAKES, MDI_2011]);<br><br>...................<br>..................<br><br>with regards<br>Venkat<br><br><div class="gmail_quote"><div><div class="h5">On Mon, Apr 9, 2012 at 9:44 AM, Özgür Arslan <span dir="ltr">&lt;<a href="mailto:ozgurarslan81@hotmail.com" target="_blank">ozgurarslan81@hotmail.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">


<div><div dir="ltr">
   HI All,<span style="display:block"><span></span> </span><br>
<br>
I am working on open layers and map file and I have a question. I am 
trying to create several layers from 1 map file on open layers, and I 
want to switch off and on but I couldn&#39;t separate the layers in 
OpenLayers. When I set layers to DEFAULT in map file it displays all 
layers together like a one layer. I can&#39;t create different layers from 
one map file. Are there any ideas? Codes are below;<br>
<br>
Thank you<br><br><br><br>&lt;html&gt;<br>&lt;head&gt;<br>  &lt;title&gt;OpenLayers Example&lt;/title&gt;<br>   &lt;link rel=&quot;stylesheet&quot; href=&quot;openlayers/theme/default/style.css&quot; type=&quot;text/css&quot;&gt;<br>

    &lt;script src=&quot;<a href="http://openlayers.org/api/OpenLayers.js" target="_blank">http://openlayers.org/api/OpenLayers.js</a>&quot;&gt;&lt;/script&gt;<br>    &lt;/head&gt;<br>    &lt;body&gt;<br>      &lt;center&gt;&lt;div id=&quot;map&quot;&gt;&lt;/div&gt;&lt;/center&gt;<br>

      &lt;style&gt;<br>    @media screen<br>    {<br>        #map{width:975px; height:750px; border: 2px solid black;}<br>    }<br>    &lt;/style&gt;<br>      &lt;script defer=&quot;defer&quot; type=&quot;text/javascript&quot;&gt;<br>

        var lon = -84.722147;<br>        var lat = 49.298594;    <br>     <br>        var zoom = 6;<br>        var map, layer;<br>      <br>        var map = new OpenLayers.Map(&#39;map&#39;);<br>        layer = new OpenLayers.Layer.WMS( &quot;QGIS-MAP&quot;,<br>

            &quot;<a href="http://localhost/cgi-bin/mapserv.exe" target="_blank">http://localhost/cgi-bin/mapserv.exe</a>&quot;, {layers: &#39;ResidentDistrict_2011,LAKES,MDI_2011&#39;,map: &#39;/wwwroot/example1_test/Canada_Mountains.map&#39;,} )<br>

        <br>        map.addLayer(layer);<br>        map.zoomToMaxExtent();  <br>        map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);<br>        <br>        map.addControl(new OpenLayers.Control.PanZoomBar());<br>

        map.addControl(new OpenLayers.Control.MouseToolbar());<br>        map.addControl(new OpenLayers.Control.LayerSwitcher());<br>        map.addControl(new OpenLayers.Control.MousePosition());<br>        map.addControl(new OpenLayers.Control.OverviewMap());<br>

      &lt;/script&gt;<br><br>&lt;/body&gt;<br>&lt;/html&gt;<br>                                               </div></div>
<br></div></div>_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br></blockquote></div><br>
</blockquote></div><br>