Thanks Arnd!<br><br>So, I have 3 WMS layers: Roads, GasStation, Country...<br>The user will select the Layer with radiobutton, and after select one data in Grid...<br><br>So I´ll use selectedWMSLayer.mergeNewParams with a SLD_BODY ...<br>
<br>Is that right?<br><br>And how about Mapfile configuration, Am I suppossed to change anything? What?<br><br>Thanks<br><br><br><div class="gmail_quote">On Mon, May 3, 2010 at 1:58 PM, Arnd Wippermann <span dir="ltr">&lt;<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Hi Paul,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">SLD_BODY is a request parameter of a wms. If you can get 
from your grid a reference to your OpenLayers WMS layer, then you can use 
</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">yourWMSlayer.mergeNewParams(&#39;SLD_BODY&#39; : 
....).</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">if your wms have only one layer (in the eample below 
POLYGONS) to request, you can use something like this</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">&lt;StyledLayerDescriptor version=&quot;1.0.0&quot; xmlns=&quot;<a href="http://www.opengis.net/sld" target="_blank">http://www.opengis.net/sld</a>&quot; xmlns:gml=&quot;<a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.net/gml</a>&quot; xmlns:ogc=&quot;<a href="http://www.opengis.net/ogc" target="_blank">http://www.opengis.net/ogc</a>&quot; 
xmlns:xlink=&quot;<a href="http://www.w3.org/1999/xlink" target="_blank">http://www.w3.org/1999/xlink</a>&quot; 
xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot; 
xsi:schemaLocation=&quot;<a href="http://www.opengis.net/sld" target="_blank">http://www.opengis.net/sld</a> <a href="http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" target="_blank">http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd</a>&quot;&gt;<br>
&lt;NamedLayer&gt;<br>&lt;Name&gt;COUNTRY&lt;/Name&gt;<br>&lt;UserStyle&gt;<br>&lt;FeatureTypeStyle&gt;<br>&lt;Rule&gt;<br>&lt;PolygonSymbolizer&gt;<br>&lt;Fill&gt;<br>&lt;CssParameter 
name=&quot;fill&quot;&gt;#f0f0f0&lt;/CssParameter&gt;<br>&lt;CssParameter 
name=&quot;fill-opacity&quot;&gt;1.00&lt;/CssParameter&gt;<br>&lt;/Fill&gt;<br>&lt;Stroke&gt;<br>&lt;CssParameter 
name=&quot;stroke&quot;&gt;#646464&lt;/CssParameter&gt;<br>&lt;/Stroke&gt;<br>&lt;/PolygonSymbolizer&gt;<br>&lt;/Rule&gt;<br>&lt;/FeatureTypeStyle&gt;<br>&lt;/UserStyle&gt;<br>&lt;/NamedLayer&gt;<br>&lt;/StyledLayerDescriptor&gt;</font></span></div>

<div> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">as SLD_BODY to highlight the the features of the layer. 
Attention! You have to delete the line feeds for the request. 
</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Zooming to the extent of the wms layer is not so easy, 
perhaps inpossible. You can request the WMS GetCapabilities and hope that there 
the correct extent are described for the layer. Or if the layer is also 
requestable as WFS you can perhaps on that way get the extent of the layer. But 
I&#39;m not sure.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">If you are the holder of the WMS server, I would suggest, 
that you calculate the extent on other ways and adds it as array to 
your application.</font></span></div>
<div dir="ltr" align="left"><span></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Arnd</font> </span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left">
<hr>
</div>
<div dir="ltr" align="left"><font face="Tahoma" size="2"><b>Von:</b> Paul james 
[mailto:<a href="mailto:pauljame@gmail.com" target="_blank">pauljame@gmail.com</a>] <br><b>Gesendet:</b> Montag, 3. Mai 2010 
16:39<br><b>An:</b> Arnd Wippermann<br><b>Cc:</b> fsalas; 
<a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a><div class="im"><br><b>Betreff:</b> Re: [OpenLayers-Users] HELP!!! How 
implement Filter in WMS Layer<br></div></font><br></div><div class="im">
<div></div>
<div>Hi Arnd...<br>I have some questions about that...<br><br>First I have a geo 
app using Openlayers/Mapserver WMS with SDE layers....<br>My application has a 
treeview with all layers, and a radiobox for each layer... When I click in a 
layer´s radiobox a window with a GRID containing all layer´s data is 
opened...<br>In that GRID, When I select a line (layer´s data), the Map should 
:<br> 1-) Highlight it <br> 2-) Zoom in data selected<br><br>Can I 
develope that using SLD and SLD_BODY ? Do you have any tip to how do 
that?<br><br>Thanks<span><font color="#0000ff" face="Arial" size="2"> </font></span></div></div></div>
</blockquote></div><br>