<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Andreas,<br>
<br>
I changed the Name of the NamedLayer inside the sld.<br>
<br>
&lt;NamedLayer&gt;<br>
&nbsp;&nbsp; &lt;Name&gt;Gewaesser&lt;/Name&gt;<br>
&nbsp;to <br>
<br>
&lt;NamedLayer&gt;<br>
&nbsp;&nbsp; &lt;Name&gt;WL:Gewaesser&lt;/Name&gt;<br>
<br>
Now, it works.<br>
<br>
Thanks a lot!<br>
<br>
regards,<br>
<br>
Sascha<br>
<br>
<blockquote cite="mid:4C36D277.60409@arcor.de" type="cite">
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
Hi Andreas,<br>
  <br>
I tried your way. <br>
  <br>
node.layer.mergeNewParams(<br>
&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sld_body&nbsp; : sld, // sld is a var with the content SLD_BODY (see
below in the table)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'styles'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : ""<br>
&nbsp;&nbsp; }<br>
);<br>
  <br>
The result is still the same. The Legend gets the new Style. The map
not.<br>
These are the Parameters Firebug gaves me, when I perform
mergeNewParams().<br>
  <br>
  <table selected="true" role="tabpanel"
 class="netInfoParamsText netInfoText 
netInfoParamsTable "
 cellpadding="0" cellspacing="0">
    <tbody class=" ">
      <tr role="listitem" class=" ">
        <td role="presentation" class="netInfoParamName "><span
 class=" ">EXCEPTIONS</span></td>
        <td role="list" aria-label="EXCEPTIONS"
 class="netInfoParamValue "><code role="listitem"
 class="focusRow subFocusRow ">application/vnd.ogc.se_xml</code></td>
      </tr>
      <tr role="listitem" class=" ">
        <td role="presentation" class="netInfoParamName "><span
 class=" ">FORMAT</span></td>
        <td role="list" aria-label="FORMAT" class="netInfoParamValue "><code
 role="listitem" class="focusRow subFocusRow ">image/gif</code></td>
      </tr>
      <tr role="listitem" class=" ">
        <td role="presentation" class="netInfoParamName "><span
 class=" ">LAYER</span></td>
        <td role="list" aria-label="LAYER" class="netInfoParamValue "><code
 role="listitem" class="focusRow subFocusRow ">WL:Gewaesser</code></td>
      </tr>
      <tr role="listitem" class=" ">
        <td role="presentation" class="netInfoParamName "><span
 class=" ">PROJECTION</span></td>
        <td role="list" aria-label="PROJECTION"
 class="netInfoParamValue "><code role="listitem"
 class="focusRow subFocusRow ">EPSG:31256</code></td>
      </tr>
      <tr role="listitem" class=" ">
        <td role="presentation" class="netInfoParamName "><span
 class=" ">REQUEST</span></td>
        <td role="list" aria-label="REQUEST" class="netInfoParamValue "><code
 role="listitem" class="focusRow subFocusRow ">GetLegendGraphic</code></td>
      </tr>
      <tr role="listitem" class=" ">
        <td role="presentation" class="netInfoParamName "><span
 class=" ">SCALE</span></td>
        <td role="list" aria-label="SCALE" class="netInfoParamValue "><code
 role="listitem" class="focusRow subFocusRow ">125000.1462402</code></td>
      </tr>
      <tr role="listitem" class=" ">
        <td role="presentation" class="netInfoParamName "><span
 class=" ">SERVICE</span></td>
        <td role="list" aria-label="SERVICE" class="netInfoParamValue "><code
 role="listitem" class="focusRow subFocusRow ">WMS</code></td>
      </tr>
      <tr role="listitem" class=" ">
        <td role="presentation" class="netInfoParamName "><span
 class=" ">SLD_BODY</span></td>
        <td role="list" aria-label="SLD_BODY" class="netInfoParamValue "><code
 role="listitem" class="focusRow subFocusRow "></code><code
 role="listitem" class="focusRow subFocusRow ">&lt;?xml version="1.0"
encoding="ISO-8859-1"?&gt;&lt;StyledLayerDescriptor version="1.0.0"
xmlns="<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.opengis">http://www.opengis</a></code><code
 role="listitem" class="focusRow subFocusRow ">.net/sld"
xmlns:ogc=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
 href="http://www.opengis.net/ogc">"http://www.opengis.net/ogc"</a>
xmlns:xlink=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
 href="http://www.w3.org/1999/xlink">"http://www.w3.org/1999/xlink"</a>
xmlns:xsi</code><code role="listitem" class="focusRow subFocusRow ">=<a
 moz-do-not-send="true" class="moz-txt-link-rfc2396E"
 href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xsi:schemaLocation="<a moz-do-not-send="true"
 class="moz-txt-link-freetext" href="http://www.opengis.net/sld">http://www.opengis.net/sld</a>
        <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://schemas">http://schemas</a></code><code role="listitem"
 class="focusRow subFocusRow ">.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"&gt;&lt;NamedLayer&gt;&lt;Name&gt;Gewaesser&lt;/Name&gt;&lt;UserStyle&gt;&lt;Title</code><code
 role="listitem" class="focusRow subFocusRow ">&gt;Gewaesser
Style&lt;/Title&gt;&lt;Abstract&gt;RGB 204 224
255&lt;/Abstract&gt;&lt;FeatureTypeStyle&gt;&lt;Rule&gt;&lt;Title&gt;Polygon&lt;/Title</code><code
 role="listitem" class="focusRow subFocusRow ">&gt;&lt;PolygonSymbolizer&gt;&lt;Fill&gt;&lt;CssParameter
name="fill"&gt;#000000&lt;/CssParameter&gt;&lt;/Fill&gt;&lt;/PolygonSymbolizer</code><code
 role="listitem" class="focusRow subFocusRow ">&gt;&lt;/Rule&gt;&lt;/FeatureTypeStyle&gt;&lt;/UserStyle&gt;&lt;/NamedLayer&gt;&lt;/StyledLayerDescriptor&gt;</code></td>
      </tr>
      <tr role="listitem" class=" ">
        <td role="presentation" class="netInfoParamName "><span
 class=" ">TRANSPARENT</span></td>
        <td role="list" aria-label="TRANSPARENT"
 class="netInfoParamValue "><code role="listitem"
 class="focusRow subFocusRow ">true</code></td>
      </tr>
      <tr role="listitem" class=" ">
        <td role="presentation" class="netInfoParamName "><span
 class=" ">VERSION</span></td>
        <td role="list" aria-label="VERSION" class="netInfoParamValue "><code
 role="listitem" class="focusRow subFocusRow ">1.1.1</code></td>
      </tr>
    </tbody>
  </table>
  <br>
The Request ist 'GetLegendGraphic'. Is this right?<br>
  <br>
Is there a requirement, that the new Style has to be on the GeoServer?<br>
  <br>
Regards,<br>
Sascha<br>
  <br>
  <blockquote
 cite="mid:6B5AC22E-DE7F-442B-BFFD-0CD7784D428C@opengeo.org" type="cite">
    <pre wrap="">On Jul 8, 2010, at 19:53 , BMcBride wrote:

  </pre>
    <blockquote type="cite">
      <pre wrap="">Try using styles: instead of sld_body:.
    </pre>
    </blockquote>
    <pre wrap="">No. sld_body is correct. But accompany it with
styles: ""
in the mergeNewParams object.

Regards,
Andreas.

  </pre>
    <blockquote type="cite">
      <pre wrap="">-----
Bryan R. McBride, GISP
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.bryanmcbride.com">http://www.bryanmcbride.com</a> bryanmcbride.com 
-- 
View this message in context: <a moz-do-not-send="true"
 class="moz-txt-link-freetext"
 href="http://osgeo-org.1803224.n2.nabble.com/MergeNewParams-redraw-tp5271050p5271258.html">http://osgeo-org.1803224.n2.nabble.com/MergeNewParams-redraw-tp5271050p5271258.html</a>
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>
    </pre>
    </blockquote>
    <pre wrap="">  </pre>
  </blockquote>
  <br>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a class="moz-txt-link-freetext" href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>
  </pre>
</blockquote>
<br>
</body>
</html>