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<br>
<br><div class="gmail_quote">On Fri, Sep 18, 2009 at 5:40 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 bgcolor="#ffffff">
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">hi salas,</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">you request the layer Cuba, but in the SLD_BODY you 
describe rules for the layer topp:cuba. Change it to Cuba. And if your SLD_BODY 
has escaped chars, change them too (%3D =, %23 #).</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">you can try this</font></span></div>
<div dir="ltr" align="left"><span><a href="http://urano/cgi-bin/mapserv.exe?map=d:/ms4w/apps/OpenLayers/data/educacion.map" target="_blank"><font face="Arial" size="2"></font></a><font face="Arial" size="2"><a href="http://urano/cgi-bin/mapserv.exe?map=d:/ms4w/apps/OpenLayers/data/educacion.map&amp;Service=WMS&amp;Version=1.1.1&amp;Request=GetStyles&amp;Layers=Cuba" target="_blank">http://urano/cgi-bin/mapserv.exe?map=d:/ms4w/apps/OpenLayers/data/educacion.map</a></font><font color="#0000ff" face="Arial" size="2">&amp;Service=WMS&amp;Version=1.1.1&amp;Request=GetStyles&amp;Layers=Cuba</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">to get a sld file for the layer defined by the mapfile 
.</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">Arnd</font></span></div><br>
<div dir="ltr" align="left" lang="de">
<hr>
<font face="Tahoma" size="2"><div class="im"><b>Von:</b> fsalas [mailto:<a href="mailto:fsalas@geocuba.cu" target="_blank">fsalas@geocuba.cu</a>] 
<br></div><b>Gesendet:</b> Freitag, 18. September 2009 23:15<div><div></div><div class="h5"><br><b>An:</b> Arnd 
Wippermann<br><b>Cc:</b> <a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a><br><b>Betreff:</b> Re: 
[OpenLayers-Users] HELP!!! How implement Filter in WMS 
Layer<br></div></div></font><br></div><div><div></div><div class="h5">
<div></div>
<div><font face="Arial" size="2">Arnd, </font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Thanks very very much for your help, the map is 
show, as you said I forgot to insert a projection block.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">My finaly objetive is obtain one maps change 
the sld_body params, but its don&#39;t affect the maps.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">This is part of my code </font></div>
<div><font face="Arial" size="2">***********************</font></div>
<div><font face="Arial" size="2"> function init(){<br>   var 
options = {<br>   projection: new 
OpenLayers.Projection(&quot;EPSG:4267&quot;),<br>   displayProjection: new 
OpenLayers.Projection(&quot;EPSG:4267&quot;),<br>   units: 
&#39;degrees&#39;,<br>   maxResolution: 
0.05115824837085553,<br>   maxExtent: new 
OpenLayers.Bounds(-86.09240990784447,19.463031059956343,-72.99589832490545,23.634939943479928),<br>   controls 
: []<br>   };</font></div>
<div> </div>
<div><font face="Arial" size="2">   map = new 
OpenLayers.Map(&#39;map&#39;,options); <br>       
<br>             // 
setup single tiled layer<br>  <br>     layer0 = 
new OpenLayers.Layer.WMS( <br>     &quot;Cuba&quot;,&quot;<a href="http://urano/cgi-bin/mapserv.exe?map=d:/ms4w/apps/OpenLayers/data/educacion.map" target="_blank">http://urano/cgi-bin/mapserv.exe?map=d:/ms4w/apps/OpenLayers/data/educacion.map</a>&quot;,<br>
           
{    layers: 
&quot;Cuba&quot;,<br>                
format: 
&quot;image/png&quot;,<br>             
    transparent: 
&#39;true&#39;    <br>           
});<br>     <br>             
layer0.isBaseLayer=true;<br>   <br>            
map.addLayers([layer0]);<br>            
<br>            // setup 
controls and initial 
zooms<br>            
map.addControl(new 
OpenLayers.Control.PanZoomBar());<br>            
map.addControl(new 
OpenLayers.Control.Navigation());<br>            
map.addControl(new 
OpenLayers.Control.Scale($(&#39;scale&#39;)));<br>            
map.addControl(new 
OpenLayers.Control.MousePosition({element:$(&#39;location&#39;)}));<br>            
map.addControl(new 
OpenLayers.Control.LayerSwitcher());<br>       }  <br>      
<br>function 
Mostrar()<br>{<br> map.layers[0].mergeNewParams({SLD_BODY:&#39;&lt;StyledLayerDescriptor 
version%3D&quot;1.0.0&quot;&gt;&lt;UserLayer&gt;&lt;Name&gt;topp:cuba&lt;/Name&gt;&lt;UserStyle&gt;&lt;Name&gt;UserSelection&lt;/Name&gt;&lt;FeatureTypeStyle&gt;&lt;Rule&gt;&lt;Filter 
xmlns:gml%3D&quot;<a href="http://www.opengis.net/gml%22%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Ecodprov%3C/PropertyName%3E%3CLiteral%3Epinar%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E%3CPolygonSymbolizer%3E%3CFill%3E%3CCssParameter" target="_blank">http://www.opengis.net/gml&quot;&gt;&lt;PropertyIsEqualTo&gt;&lt;PropertyName&gt;codprov&lt;/PropertyName&gt;&lt;Literal&gt;pinar&lt;/Literal&gt;&lt;/PropertyIsEqualTo&gt;&lt;/Filter&gt;&lt;PolygonSymbolizer&gt;&lt;Fill&gt;&lt;CssParameter</a> 
name%3D&quot;fill&quot;&gt;%23FF0000&lt;/CssParameter&gt;&lt;/Fill&gt;&lt;/PolygonSymbolizer&gt;&lt;/Rule&gt;&lt;Rule&gt;&lt;LineSymbolizer&gt;&lt;Stroke/&gt;&lt;/LineSymbolizer&gt;&lt;/Rule&gt;&lt;/FeatureTypeStyle&gt;&lt;/UserStyle&gt;&lt;/UserLayer&gt;&lt;/StyledLayerDescriptor&gt;&#39;});</font></div>

<div> </div>
<div><font face="Arial" size="2">}</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Best Regards,</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Salas</font></div>
<div> </div>
<div> </div>
<div><font face="Arial" size="2">***************</font> </div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: 2px solid rgb(0, 0, 0); margin-right: 0px;">
  <div style="font: 10pt arial;">----- Original Message ----- </div>
  <div style="background: none repeat scroll 0% 0% rgb(228, 228, 228); font: 10pt arial;"><b>From:</b> 
  <a title="arnd.wippermann@web.de" href="mailto:arnd.wippermann@web.de" target="_blank">Arnd 
  Wippermann</a> </div>
  <div style="font: 10pt arial;"><b>To:</b> <a title="fsalas@geocuba.cu" href="mailto:fsalas@geocuba.cu" target="_blank">&#39;fsalas&#39;</a> </div>
  <div style="font: 10pt arial;"><b>Sent:</b> Friday, September 18, 2009 1:50 
  PM</div>
  <div style="font: 10pt arial;"><b>Subject:</b> AW: [OpenLayers-Users] HELP!!! 
  How implement Filter in WMS Layer</div>
  <div><br></div>
  <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Hi salas,</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">as the message says, you have forgotten to insert a 
  projection block in the mapfile on map level.</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">  PROJECTION<br>    
  &#39;init=EPSG:4267&#39;<br>  END<br></font></span></div>
  <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Arnd</font></span></div><br>
  <div dir="ltr" align="left" lang="de">
  <hr>
  <font face="Tahoma" size="2"><b>Von:</b> fsalas [mailto:<a href="mailto:fsalas@geocuba.cu" target="_blank">fsalas@geocuba.cu</a>] 
  <br><b>Gesendet:</b> Freitag, 18. September 2009 19:28<br><b>An:</b> Arnd 
  Wippermann<br><b>Betreff:</b> Re: [OpenLayers-Users] HELP!!! How implement 
  Filter in WMS Layer<br></font><br></div>
  <div></div>
  <div><font face="Arial" size="2">Arnd, the problem persist , I atach the imagen 
  error and the map file and the html file.</font></div>
  <div><font face="Arial" size="2"></font> </div>
  <div>
  <p><font face="Arial" size="2"><font size="3">I don´t know how resolve this problem, 
  can you chek this files?</font></font></p>
  <p><font face="Arial"></font> </p>
  <p><font face="Arial">Regards , salas</font></p>
  <p><font face="Arial" size="2">----- Original Message ----- </font></p></div>
  <div>
  <div><font face="Arial" size="2">From: &quot;Arnd Wippermann&quot; &lt;</font><a href="mailto:arnd.wippermann@web.de" target="_blank"><font face="Arial" size="2">arnd.wippermann@web.de</font></a><font face="Arial" size="2">&gt;</font></div>

  <div><font face="Arial" size="2">To: &quot;&#39;fsalas&#39;&quot; &lt;</font><a href="mailto:fsalas@geocuba.cu" target="_blank"><font face="Arial" size="2">fsalas@geocuba.cu</font></a><font face="Arial" size="2">&gt;</font></div>

  <div><font face="Arial" size="2">Sent: Friday, September 18, 2009 10:28 
  AM</font></div>
  <div><font face="Arial" size="2">Subject: AW: [OpenLayers-Users] HELP!!! How 
  implement Filter in WMS Layer</font></div></div>
  <div><font face="Arial"><br><font size="2"></font></font></div><font face="Arial" size="2">Hi salas,<br><br>Now have a look at your OpenLayers code. I suggest, 
  that you have no options<br>set for your 
  map.<br><br>            
  var options = 
  {<br>                
  projection: new 
  OpenLayers.Projection(&quot;EPSG:900913&quot;),<br>                
  displayProjection: new 
  OpenLayers.Projection(&quot;EPSG:4326&quot;),<br>                
  units: 
  &quot;m&quot;,<br>                
  numZoomLevels: 
  18,<br>                
  maxResolution: 
  156543.0339,<br>                
  maxExtent: new OpenLayers.Bounds(-20037508, -20037508,<br>20037508, 
  20037508.34),<br>                
  controls      : 
  []<br>            
  };<br><br>            
  map = new OpenLayers.Map(&#39;map&#39;, options); <br><br>It is an example for the 
  google projection.<br><br>Arnd<br><br>-----Ursprüngliche 
  Nachricht-----<br>Von: fsalas [mailto:<a href="mailto:fsalas@geocuba.cu" target="_blank">fsalas@geocuba.cu</a>] <br>Gesendet: 
  Freitag, 18. September 2009 18:14<br>An: Arnd Wippermann<br>Cc: </font><a href="mailto:users@openlayers.org" target="_blank"><font face="Arial" size="2">users@openlayers.org</font></a><br><font face="Arial" size="2">Betreff: Re: 
  [OpenLayers-Users] HELP!!! How implement Filter in WMS 
  Layer<br><br>Arnd,<br><br>I don&#39;t Know why in WMS request ,the EPSG is 
  different of 2085, Its<br>EPSG:4326<br><br>----- Original Message 
  -----<br>From: &quot;Arnd Wippermann&quot; &lt;</font><a href="mailto:arnd.wippermann@web.de" target="_blank"><font face="Arial" size="2">arnd.wippermann@web.de</font></a><font face="Arial" size="2">&gt;<br>To: 
  &quot;&#39;fsalas&#39;&quot; &lt;</font><a href="mailto:fsalas@geocuba.cu" target="_blank"><font face="Arial" size="2">fsalas@geocuba.cu</font></a><font face="Arial" size="2">&gt;<br>Sent: 
  Friday, September 18, 2009 9:06 AM<br>Subject: AW: [OpenLayers-Users] HELP!!! 
  How implement Filter in WMS Layer<br><br><br>Hi,<br><br>You have not added the 
  projection block to the layer. Perhaps it is needed,<br>i&#39;m not sure. I 
  declare always a projection for the map (as default output),<br>and for the 
  layers (the data have to be in a specific projection).<br><br>If the problem 
  remain, do the next:<br><br>The message comes, when the WMS requests for an 
  EPSG, that is not declared<br>in the wms_srs tag. Have you in OpenLayers the 
  projection for the map set to<br>EPSG:2085. For the layer you need not declare 
  the SRS, because OpenLayers<br>add the EPSG from the map to the SRS parameter 
  for the WMS layer.<br><br>Use right click on your map to get the url for one 
  tile of your WMS. Paste<br>the url into the addressbar of your browser. The 
  errormessage should be the<br>same. But now you can inspect the WMS request. 
  Look at the SRS. Is 
  it<br>&amp;SRS=EPSG:2085?<br><br>Arnd<br><br>-----Ursprüngliche 
  Nachricht-----<br>Von: fsalas [mailto:<a href="mailto:fsalas@geocuba.cu" target="_blank">fsalas@geocuba.cu</a>]<br>Gesendet: Freitag, 
  18. September 2009 16:31<br>An: Arnd Wippermann<br>Betreff: Re: 
  [OpenLayers-Users] HELP!!! How implement Filter in WMS Layer<br><br>Arn , I 
  make your suggestion in my map file but the problem persist<br><br>I atach my 
  map file and the error image<br><br>regards 
  salas<br><br>___________________________________<br>Dirección de 
  Comunicaciones<br>Grupo Empresarial GEOCUBA<br>Este mensaje esta libre de 
  virus.<br>Revisado por Kaspersky 
  Antivirus<br>----------------------------------------------------------------------<br>Definition 
  count:  2596814<br>Definition date:  9/18/2009<br>SecurityPlus 
  version: 
  3.0.5<br><br><br><br><br>___________________________________<br>Dirección de 
  Comunicaciones<br>Grupo Empresarial GEOCUBA<br>Este mensaje esta libre de 
  virus. <br>Revisado por Kaspersky 
  Antivirus<br>----------------------------------------------------------------------<br>Definition 
  count:  2596814<br>Definition date:  9/18/2009<br>SecurityPlus 
  version: 
  3.0.5<br><br><br><br></font><br>___________________________________<br>Dirección 
  de Comunicaciones<br>Grupo Empresarial GEOCUBA<br>Este mensaje esta libre de 
  virus. <br>Revisado por Kaspersky 
  Antivirus<br>----------------------------------------------------------------------<br>Definition 
  count: 2596814 Definition date: 9/18/2009 SecurityPlus version: 3.0.5 
<br></blockquote><br>___________________________________<br>Dirección de 
Comunicaciones<br>Grupo Empresarial GEOCUBA<br>Este mensaje esta libre de virus. 
<br>Revisado por Kaspersky 
Antivirus<br>----------------------------------------------------------------------<br>Definition 
count: 2596814 Definition date: 9/18/2009 SecurityPlus version: 3.0.5 
<br></div></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br>