Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am developing GIS Portal using OpenLayers, I use WFS GetFeature to retrive some datas like bellow:

var layer = map.getLayersByName("pf_trecho_at");

var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer");

var protocol = new OpenLayers.Protocol.WFS.fromWMSLayer(layer[0], {
                    url: "/geoserver/wfs",
                    featurePrefix: 'light',
                    readFormat: new OpenLayers.Format.GeoJSON(),
                    outputFormat: "JSON",
                    extractAttributes: true
control = new OpenLayers.Control.GetFeature({                   
            protocol: protocol,
            box: true,
            hover: true,
            multipleKey: "shiftKey",
            toggleKey: "ctrlKey"
        });"featureselected", this, function(e) {                  

            this.displayPopup(e, 'pf_trecho_at');
        });"featureunselected", this, function(e) {


My doubt is, the selection control draw a rectangle to select the features, is it possible do draw a circle to select then?

share|improve this question

1 Answer 1

The link below contains an example using an OpenLayers2 DrawFeature control that allows to select features via a circle. It can help using WFS GetFeature to retrieve some datas using polygon or linestring drawing tools ows.js : Ease OGC Web Services (OWS) calls with javascript.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.