[OpenLayers-Users] Select WFS Features using intersect of polygon

Phil Scadden p.scadden at gns.cri.nz
Tue Feb 14 17:02:46 EST 2012


I do the select with featureadded. Eg here is my code.

                 pySelCtrl = new 
OpenLayers.Control.DrawFeature(selectedLayer, OpenLayers.Handler.Polygon, {
                     geodesic: true,
                     handlerOptions: {
                         citeCompliant: true
                     }
                 });
                 pySelCtrl.events.register("featureadded", this, 
function (e) {
                     clearData();
                     var pfilter = new OpenLayers.Filter.Spatial({
                             type: OpenLayers.Filter.Spatial.INTERSECTS,
                             value: e.feature.geometry
                         });
                     }
                     wfsProtocol.read({
                         filter:  pfilter,
                         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.



More information about the Users mailing list