Hello,
Im using 1.7.4 … I just wanted to know is there anyway that you can turn the labels on and off through WMS request, since it is not possible for the user to acess the SLD and change it himself, so I was wondering if I could do that using wms request since the labels at time mess up the map too much, but i havent found anything yet. Does anybody have an idea how do I do that?
regards,
Imran
–
I.R
One option is to define a copy of the style on the server, without labels, and refer to that style name using the mandatory STYLES parameter.
-Arne
Imran Rajjad wrote:
Hello,
Im using 1.7.4 .. I just wanted to know is there anyway that you can turn the labels on and off through WMS request, since it is not possible for the user to acess the SLD and change it himself, so I was wondering if I could do that using wms request since the labels at time mess up the map too much, but i havent found anything yet. Does anybody have an idea how do I do that?
regards,
Imran
--
I.R
An identical SLD without labels?.. can you kindly give an example of how this parameter is used??
thnx a gazilion
Imran
On Wed, Oct 14, 2009 at 3:42 PM, Arne Kepp <ak@anonymised.com> wrote:
One option is to define a copy of the style on the server, without labels, and refer to that style name using the mandatory STYLES parameter.
-Arne
Imran Rajjad wrote:
Hello,
Im using 1.7.4 … I just wanted to know is there anyway that you can turn the labels on and off through WMS request, since it is not possible for the user to acess the SLD and change it himself, so I was wondering if I could do that using wms request since the labels at time mess up the map too much, but i havent found anything yet. Does anybody have an idea how do I do that?
regards,
Imran
–
I.R
–
I.R
Create two SLD in your geoserver, one with the textsymbolizer that renders the labels for the given feature (SLD_LABEL.sld) and other without the textsymbolizer (SLD_GEOM.sql) (or u could configure a pointsymbolizer, linesymbolizer, etc whatever type of geometry ur feature is).
Then u just switch wms requests on ur demand on the client side:
-
When u wanna see labels the wms request must have …&STYLES=sld_label…
-
When u don’t wanna see labels but instead some symbol or line representing or geometry, then the wms request must have …&STYLES=sld_geom…
This is quite easy to achieve when using a javascript client like OpenLayers.
Hope this helps.
Cumprimentos,
Pedro M. Garcia Mendes
De: Imran Rajjad [mailto:rajjad@anonymised.com]
Enviada: quarta-feira, 14 de Outubro de 2009 12:01
Para: Arne Kepp
Cc: geoserver-devel@lists.sourceforge.net
Assunto: Re: [Geoserver-devel] Switching Labels on/off through WMS?
An identical SLD without labels?.. can you kindly give an example of how this parameter is used??
thnx a gazilion
Imran
On Wed, Oct 14, 2009 at 3:42 PM, Arne Kepp <ak@anonymised.com> wrote:
One option is to define a copy of the style on the server, without labels, and refer to that style name using the mandatory STYLES parameter.
-Arne
Imran Rajjad wrote:
Hello,
Im using 1.7.4 … I just wanted to know is there anyway that you can turn the labels on and off through WMS request, since it is not possible for the user to acess the SLD and change it himself, so I was wondering if I could do that using wms request since the labels at time mess up the map too much, but i havent found anything yet. Does anybody have an idea how do I do that?
regards,
Imran
–
I.R
–
I.R