You can declare it as a param, because it is a WMS param:
 
var wms5 = new OpenLayers.Layer.WMS("Layername", 
    "http://192.168.12.60/cgi-bin/mapserv?map=/var/www/demo.map";, 
    {   layers: 'Layername' ,
        transparent: 'true',
        SLD:"http://urltomySLDfile.xml";
    }, 
    {   buffer: 0, 
        isBaseLayer: false, 
        noMagic: 'true'
    }
);

The same way you can use SLD_BODY.
 
Arnd

  _____  

Von: [email protected]
[mailto:[email protected]] Im Auftrag von Tonton
Gesendet: Montag, 6. Dezember 2010 17:06
An: [email protected]
Betreff: Re: [OpenLayers-Users] SLD=?




 

> http://myserver/cgi-bi/wms0?SERVICE=WMS
<http://myserver/cgi-bi/wms0?SERVICE=WMS&VersION=1.1.1&Request=GetMap&Layers
=mylayer&SLD=http://urltomySLDfile.xml>
&VersION=1.1.1&Request=GetMap&Layers=mylayer&SLD=http://urltomySLDfile.xml



Newbie what i am ! 

var wms5 = new OpenLayers.Layer.WMS( 
"Layername", 
"http://192.168.12.60/cgi-bin/mapserv?map=/var/www/demo.map
<http://192.168.12.60/cgi-bin/mapserv?map=/var/www/demo.map&;>
&SLD=http://urltomySLDfile.xml&";, 
{layers: 'Layername' ,transparent: 'true'}, 
{buffer: 0, isBaseLayer: false}, 
{noMagic: 'true'} );



_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to