[OpenLayers-Users] mergeNewParams + Legend

Sascha Müller olaiya at arcor.de
Thu Aug 5 11:45:01 EDT 2010



Hi,

I tried this SLD with only two instead of five rules. It works.
Could it be, that the request 'GetLegendGraphic' is too long with the 
SLD inside?
Like mergeNewParams() without 'Post'  in 'OpenLayers.Layer.WMS'.

Is there a way to implement it?
Or is this more a GeoServer thing?

Sascha


>
> Hi,
>
> I use:
>
> GeoExt: trunk (Revision: 2257)
> OpenLayers: 2.9
> GeoExt: 3.2.1
> GeoServer: 1.7.7
>
>
> I use mergeNewParams() to change the Style of a layer. This approach
> works except for one layer.
> This layer contains five rules with filter. The map changes after
> mergeNewParams(), the legend not.
> The layername is still there, the images of the five rules are gone.
>
> If I use this SLD (see below) for the layer with the GeoServer from
> start, the layer appears in map and legend. only after
> mergenewParams() the layer appears not in the legend.
>
> The layer uses this:  var addlayer = new OpenLayers.Layer.WMS.Post()
>
> SLD
> ===
> <?xml version="1.0" encoding="UTF-8"?>
> <sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld"
> xmlns:sld="http://www.opengis.net/sld"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml" version="1.0.0">
> <sld:NamedLayer>
> <Name>WL:UBahn</Name>
> <sld:UserStyle>
> <sld:Name>Default Styler</sld:Name>
> <sld:Title/>
> <sld:FeatureTypeStyle>
> <sld:Name>name</sld:Name>
> <sld:FeatureTypeName>Feature</sld:FeatureTypeName>
> <sld:SemanticTypeIdentifier>generic:geometry</sld:SemanticTypeIdentifier>
> <sld:SemanticTypeIdentifier>colorbrewer:unique:oranges</sld:SemanticTypeIdentifier>
> <sld:Rule>
> <sld:MinScaleDenominator>0</sld:MinScaleDenominator>
> <sld:MaxScaleDenominator>100000000</sld:MaxScaleDenominator>
> <sld:Name>rule01</sld:Name>
> <sld:Title>U1</sld:Title>
> <Filter>
> <PropertyIsEqualTo>
> <PropertyName>LINIE</PropertyName>
> <Literal>U1</Literal>
> </PropertyIsEqualTo>
> </Filter>
> <sld:LineSymbolizer>
> <sld:Stroke>
> <sld:CssParameter name="stroke">
> <Literal>#FEEDDE</Literal>
> </sld:CssParameter>
> <sld:CssParameter name="stroke-linecap">
> <Literal>butt</Literal>
> </sld:CssParameter>
> <sld:CssParameter name="stroke-linejoin">
> <Literal>miter</Literal>
> </sld:CssParameter>
> <sld:CssParameter name="stroke-opacity">1</sld:CssParameter>
> <sld:CssParameter name="stroke-width">3</sld:CssParameter>
> <sld:CssParameter name="stroke-dashoffset">
> <Literal>0</Literal>
> </sld:CssParameter>
> </sld:Stroke>
> </sld:LineSymbolizer>
> </sld:Rule>
>
> <!-- The other RULSs looks the same like the one above -->
>
> </sld:FeatureTypeStyle>
> </sld:UserStyle>
> </sld:NamedLayer>
> </sld:StyledLayerDescriptor>
>
> Is there something wrong with the SLD? Do I have something to consider
> if I use mergeNewParams(), or something with the Legend?
>
> Thanks
>
> Sascha
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
>    





More information about the Users mailing list