Hi All,
this is probably more a SLD-issue. I use a scale-sensitive SLD as below. But
the legend (in mapbender) always shows both lines, even when I adress
directly to the server
(http://129.143.96.48:8080/geoserver/wms/GetLegendGraphic?VERSION=1.0.0&FORM
AT=image/png&WIDTH=20&HEIGHT=20&LAYER=shapes_bw:krei25).
I'm using Geoserver 1.5.3. Does anybody know some help?
Best regards,
Tilo
-------------------
<FeatureTypeStyle>
<Rule>
<Name>Rule 1</Name>
<Title>Kreisgrenze</Title>
<MinScaleDenominator>100</MinScaleDenominator>
<MaxScaleDenominator>1000000</MaxScaleDenominator>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#B4B6D6</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<Rule>
<MinScaleDenominator>1000001</MinScaleDenominator>
<MaxScaleDenominator>10000000</MaxScaleDenominator>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#7A7AB7</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
---------------------
Hi Tilo,
I believe this is the intended behavior. Since there is not bbox
supplied to a GetLegendGraphic request there is not really a way for it
to figure out the current scale. So it creates a legend which depicts
the style for every scale.
I could see this as being a useful extension, but not trivial to implement.
-Justin
Tilo Wütherich wrote:
Hi All,
this is probably more a SLD-issue. I use a scale-sensitive SLD as below. But
the legend (in mapbender) always shows both lines, even when I adress
directly to the server
(http://129.143.96.48:8080/geoserver/wms/GetLegendGraphic?VERSION=1.0.0&FORM
AT=image/png&WIDTH=20&HEIGHT=20&LAYER=shapes_bw:krei25).
I'm using Geoserver 1.5.3. Does anybody know some help?
Best regards,
Tilo
-------------------
<FeatureTypeStyle>
<Rule>
<Name>Rule 1</Name>
<Title>Kreisgrenze</Title>
<MinScaleDenominator>100</MinScaleDenominator>
<MaxScaleDenominator>1000000</MaxScaleDenominator>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#B4B6D6</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<Rule>
<MinScaleDenominator>1000001</MinScaleDenominator>
<MaxScaleDenominator>10000000</MaxScaleDenominator>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#7A7AB7</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
---------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:4007,479dc75b115901849620573!
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org
Justin Deoliveira ha scritto:
Hi Tilo,
I believe this is the intended behavior. Since there is not bbox
supplied to a GetLegendGraphic request there is not really a way for it
to figure out the current scale. So it creates a legend which depicts
the style for every scale.
I could see this as being a useful extension, but not trivial to implement.
I had a look at the code and it seems we have a custom extension
that allows to specify a scale appending &scale=xxx (where xxx is the actual scale value, so if you want the legend for scale 1:1000 you'd have to specify 0.001).
I was not aware of it, probably one extension added during Saul's
work on legends... worth giving it a try.
Cheers
Andrea