[OpenLayers-Users] MergeNewParams / redraw [SOLVED]

Sascha Müller olaiya at arcor.de
Fri Jul 9 04:04:23 EDT 2010


Hi Andreas,

I changed the Name of the NamedLayer inside the sld.

<NamedLayer>
<Name>Gewaesser</Name>
  to

<NamedLayer>
<Name>WL:Gewaesser</Name>

Now, it works.

Thanks a lot!

regards,

Sascha

> Hi Andreas,
>
> I tried your way.
>
> node.layer.mergeNewParams(
>    {
>       sld_body  : sld, // sld is a var with the content SLD_BODY (see 
> below in the table)
>       'styles'      : ""
>    }
> );
>
> The result is still the same. The Legend gets the new Style. The map not.
> These are the Parameters Firebug gaves me, when I perform 
> mergeNewParams().
>
> EXCEPTIONS 	|application/vnd.ogc.se_xml|
> FORMAT 	|image/gif|
> LAYER 	|WL:Gewaesser|
> PROJECTION 	|EPSG:31256|
> REQUEST 	|GetLegendGraphic|
> SCALE 	|125000.1462402|
> SERVICE 	|WMS|
> SLD_BODY 	|||<?xml version="1.0" 
> encoding="ISO-8859-1"?><StyledLayerDescriptor version="1.0.0" 
> xmlns="http://www.opengis||.net/sld" 
> xmlns:ogc="http://www.opengis.net/ogc" 
> xmlns:xlink="http://www.w3.org/1999/xlink" 
> xmlns:xsi||="http://www.w3.org/2001/XMLSchema-instance" 
> xsi:schemaLocation="http://www.opengis.net/sld 
> http://schemas||.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"><NamedLayer><Name>Gewaesser</Name><UserStyle><Title||>Gewaesser 
> Style</Title><Abstract>RGB 204 224 
> 255</Abstract><FeatureTypeStyle><Rule><Title>Polygon</Title||><PolygonSymbolizer><Fill><CssParameter 
> name="fill">#000000</CssParameter></Fill></PolygonSymbolizer||></Rule></FeatureTypeStyle></UserStyle></NamedLayer></StyledLayerDescriptor>| 
>
> TRANSPARENT 	|true|
> VERSION 	|1.1.1|
>
>
> The Request ist 'GetLegendGraphic'. Is this right?
>
> Is there a requirement, that the new Style has to be on the GeoServer?
>
> Regards,
> Sascha
>
>> On Jul 8, 2010, at 19:53 , BMcBride wrote:
>>
>>    
>>> Try using styles: instead of sld_body:.
>>>      
>> No. sld_body is correct. But accompany it with
>> styles: ""
>> in the mergeNewParams object.
>>
>> Regards,
>> Andreas.
>>
>>    
>>> -----
>>> Bryan R. McBride, GISP
>>> http://www.bryanmcbride.com  bryanmcbride.com
>>> -- 
>>> View this message in context:http://osgeo-org.1803224.n2.nabble.com/MergeNewParams-redraw-tp5271050p5271258.html
>>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>      
>>    
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100709/cb518a49/attachment.html


More information about the Users mailing list