[OpenLayers-Users] Highlight features in WMS Layer

Phil Scadden p.scadden at gns.cri.nz
Tue Oct 9 13:20:48 PDT 2012


>
> Actually that is where I am confused. I am already using 
> the OpenLayers.Handler.Polygon for the draw feature and I am not sure 
> how or where to include the OpenLayers.Control.SLDSelect as it also 
> needs the OpenLayers.Handler.Polygon, according to the example.
You use SLDSelect instead of drawfeature.

My code for using the SLD + WFS looks something like:

sldCtrl = new OpenLayers.Control.SLDSelect(OpenLayers.Handler.Polygon,
                                  {
                                         displayClass: 
'olControlSLDSelectPolygon',
                                         layers:mylayer
                                  });
                 sldCtrl.events.register("selected", this, function(e){
                       // application specific code to clean up popups 
etc, and populate propNames, plus fixup SRS in filter if needed goes here.
                      // propNames ONLY contains desired attributes and 
does not include SHAPE
                          wfsProtocol.read({  // wfsProtocol previous create
                             filter: e.filters[0],
                             propertyNames: propNames,
                             callback: processSpatialQuery,
                             scope: strategy
                          });


Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20121010/5fa8c54c/attachment.html>


More information about the Users mailing list