[OpenLayers-Users] show only specific objects, wms
T at f!t
grob_david at gmx.ch
Sat May 1 08:33:47 EDT 2010
Thank you for your answer.
I tried it, but it always show the default style. My code is like this.
theSLD_BODY= '<?xml version="1.0"
encoding="ISO-8859-1"?><StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
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"><NamedLayer><Name>Linien</Name><UserStyle><Title>Linienobjekte
im WebGIS der
ETH</Title><FeatureTypeStyle><Rule><Name>Trockenmauer</Name><ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>PflE_art_n</ogc:PropertyName><ogc:Literal>1780</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter><LineSymbolizer><Stroke><CssParameter
name="stroke">#38A800</CssParameter><CssParameter
name="stroke-width">3</CssParameter></Stroke></LineSymbolizer></Rule></FeatureTypeStyle></UserStyle></NamedLayer></StyledLayerDescriptor>';
linien = new OpenLayers.Layer.WMS("Linien",url,params,options);
linien.mergeNewParams({"SLD_BODY":theSLD_BODY});
I tried also
linien.mergeNewParams({ SLD_BODY : theSLD_BODY });
After this the Layer is draw again. But it has still the same style.
Do you know what the problem could be?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/show-only-specific-objects-wms-tp4986382p4989878.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list