[OpenLayers-Users] opacity

Chris Brisenidne chris at powerhousetechgrp.com
Sat Dec 15 11:54:27 EST 2007


I am having trouble setting up opacity in my nextrad layer can some one 
please help?
thx

<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
   <style type="text/css">
       #map {
           width: 512px;
           height: 512px;
           border: 1px solid black;
       }
   </style>
   <script src="../lib/OpenLayers.js"></script>
   <script type="text/javascript">
       var map, layer;

       function init(){
           OpenLayers.ProxyHost="/proxy/?url=";
           map = new OpenLayers.Map('map');
           layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
               "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
           map.addLayer(layer);
           layer = new OpenLayers.Layer.WMS( "NEXRAD",
        
"http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?",{layers: 
'nexrad-n0r-m45m',excepitions:"application/vnd.ogc.se_xml",transparent: 
"true", format: "image/png"},
    { tileSize: new OpenLayers.Size(256,256),
    buffer: 1 } );
           map.addLayer(layer);
           map.addControl(new OpenLayers.Control.LayerSwitcher());
           map.setCenter(new OpenLayers.LonLat(-100, 60), 3);
       }
   </script>
 </head>
 <body onload="init()">
   <h1>OpenLayers Example</h1>

   <div id="map"></div>
 </body>
</html>





More information about the Users mailing list