Arto,

I will try to clarify...

I have a parcel shapefile served from GeoServer as a WMS layer. The default
SLD is a simple yellow polygon. In order to "highlight" a specific parcel,
here is what I have done...

1) Create a highlight style in GeoServer (I copied my yellow polygon and
changed it to bright blue)
2) Create a highlight layer in your map (I copied my parcel layer and
defined the highlight style)
3) Make sure the highlight layer draws above the parcel layer and set
visibility:false
4) Before the highlight layer gets drawn, I update the parameters to include
a cql_filter with the parcel ID I pass to it. The cql_filter is a WMS
parameter that functions server-side. See the geoserver documentation here: 
http://docs.geoserver.org/stable/en/user/tutorials/cql/cql_tutorial.html?highlight=cql
http://docs.geoserver.org/stable/en/user/tutorials/cql/cql_tutorial.html?highlight=cql
.

I posted the highlightWMS(parcelid) function in my previous post. This
function passes the parcel ID to the cql_filter and then draws the highlight
layer. This replaces the highlightWMS(idn) function on the wiki page.

I should explain that I only use WFS for the search query- so it does not
pertain to the highlighting- except that the result of the query contains
the parcelid, which is included in the  highlightWMS function.

-----
Bryan R. McBride, GISP
http://www.bryanmcbride.com bryanmcbride.com 
http://geoserving.net/ geoserving.net 
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-bypass-the-default-SLD-tp5653977p5655807.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to