Hi, SLD_BODY is another option but I fear no ready made application supports it. So if this is the default rendering
http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/osm-mapserver_i.map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=469&HEIGHT=354&LAYERS=roadsfar_01&TRANSPARENT=TRUE&FORMAT=image/png&BBOX=252097.87225892936,6798498.983050847,526331.9582495452,7005490.169491526&SRS=EPSG:3067&STYLES= Then with this nice URL with SLD_BODY URL user can ask server to send it with different styles http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/osm-mapserver_i.map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=469&HEIGHT=354&LAYERS=roadsfar_01&TRANSPARENT=TRUE&FORMAT=image/png&BBOX=252097.87225892936,6798498.983050847,526331.9582495452,7005490.169491526&SRS=EPSG:3067&STYLES=&SLD_BODY=%3CStyledLayerDescriptor%20version%3D%221.0.0%22%20xmlns%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld%22%20xmlns%3Agml%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%22%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%20xsi%3AschemaLocation%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld%20http%3A%2F%2Fschemas.opengis.net%2Fsld%2F1.0.0%2FStyledLayerDescriptor.xsd%22%3E%20%3CNamedLayer%3E%20%3CName%3Eroadsfar_01%3C%2FName%3E%20%3CUserStyle%3E%20%3CFeatureTypeStyle%3E%20%3CRule%3E%20%3Cogc%3AFilter%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Ehighway%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3Etrunk%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3C%2Fogc%3AFilter%3E%20%3CMinScaleDenominator%3E1000010.000000%3C%2FMinScaleDenominator%3E%20%3CMaxScaleDenominator%3E2500010.000000%3C%2FMaxScaleDenominator%3E%20%3CLineSymbolizer%3E%20%3CStroke%3E%20%3CCssParameter%20name%3D%22stroke%22%3E%2300ff00%3C%2FCssParameter%3E%20%3CCssParameter%20name%3D%22stroke-opacity%22%3E1.00%3C%2FCssParameter%3E%20%3CCssParameter%20name%3D%22stroke-width%22%3E3.00%3C%2FCssParameter%3E%20%3C%2FStroke%3E%20%3C%2FLineSymbolizer%3E%20%3CTextSymbolizer%3E%20%3CLabel%3Eref%3C%2FLabel%3E%20%3CFont%3E%20%3CCssParameter%20name%3D%22font-family%22%3Escb%3C%2FCssParameter%3E%20%3CCssParameter%20name%3D%22font-size%22%3E16.00%3C%2FCssParameter%3E%20%3C%2FFont%3E%20%3CLabelPlacement%3E%20%3CPointPlacement%3E%20%3CAnchorPoint%3E%20%3CAnchorPointX%3E0.5%3C%2FAnchorPointX%3E%20%3CAnchorPointY%3E0.5%3C%2FAnchorPointY%3E%20%3C%2FAnchorPoint%3E%20%3C%2FPointPlacement%3E%20%3C%2FLabelPlacement%3E%20%3CFill%3E%20%3CCssParameter%20name%3D%22fill%22%3E%23000000%3C%2FCssParameter%3E%20%3C%2FFill%3E%20%3C%2FTextSymbolizer%3E%20%3C%2FRule%3E%20%3CRule%3E%20%3Cogc%3AFilter%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Ehighway%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3Eprimary%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3C%2Fogc%3AFilter%3E%20%3CMinScaleDenominator%3E1000010.000000%3C%2FMinScaleDenominator%3E%20%3CMaxScaleDenominator%3E2500010.000000%3C%2FMaxScaleDenominator%3E%20%3CLineSymbolizer%3E%20%3CStroke%3E%20%3CCssParameter%20name%3D%22stroke%22%3E%23ff0000%3C%2FCssParameter%3E%20%3CCssParameter%20name%3D%22stroke-opacity%22%3E1.00%3C%2FCssParameter%3E%20%3CCssParameter%20name%3D%22stroke-width%22%3E3.00%3C%2FCssParameter%3E%20%3C%2FStroke%3E%20%3C%2FLineSymbolizer%3E%20%3CTextSymbolizer%3E%20%3CLabel%3Eref%3C%2FLabel%3E%20%3CFont%3E%20%3CCssParameter%20name%3D%22font-family%22%3Escb%3C%2FCssParameter%3E%20%3CCssParameter%20name%3D%22font-size%22%3E16.00%3C%2FCssParameter%3E%20%3C%2FFont%3E%20%3CLabelPlacement%3E%20%3CPointPlacement%3E%20%3CAnchorPoint%3E%20%3CAnchorPointX%3E0.5%3C%2FAnchorPointX%3E%20%3CAnchorPointY%3E0.5%3C%2FAnchorPointY%3E%20%3C%2FAnchorPoint%3E%20%3C%2FPointPlacement%3E%20%3C%2FLabelPlacement%3E%20%3CFill%3E%20%3CCssParameter%20name%3D%22fill%22%3E%230000ff%3C%2FCssParameter%3E%20%3C%2FFill%3E%20%3C%2FTextSymbolizer%3E%20%3C%2FRule%3E%20%3C%2FFeatureTypeStyle%3E%20%3C%2FUserStyle%3E%20%3C%2FNamedLayer%3E%20%3C%2FStyledLayerDescriptor%3E -Jukka Rahkonen- ________________________________ Lähettäjä: David Winslow [dwins...@opengeo.org] Lähetetty: 26. marraskuuta 2012 20:10 Vastaanottaja: manish.barapa...@bt.com Kopio: geoserver-users@lists.sourceforge.net Aihe: Re: [Geoserver-users] [Geoserver-devel] Switching Text Labels on/off One solution would be to create two styles - one without the labels and one with only labels. Then your client can disable labels by requesting only the labelled style, and enable them by repeating the layer twice and specifying the labels style for the second. With labels: request=GetMap&layers=mylayer,mylayer&styles=,withlabels Without labels: request=GetMap&layers=mylayer -- David Winslow OpenGeo - http://opengeo.org/ On Mon, Nov 26, 2012 at 1:06 PM, <manish.barapa...@bt.com<mailto:manish.barapa...@bt.com>> wrote: Hi there, I have a number of layers in my application. I created WMS for each of them with a default styling in GeoServer. The default styling has PointSymboliser and TextSymboliser both. When I render the WMS I get Symbols and Labels both. I want an option by which I can turn off/on the Text Labels while rendering the WMS. What is best way to achieve this? Does creating Additional Styling while creating WMS solve this? Regards, Manish Barapatre | BT PP5, 2nd Floor, Orion, Adastral Park, Ipswich (UK) Office: 01473 650516 ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net<mailto:Geoserver-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/geoserver-users ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users