[Users] Selection using rectangle

Ian Turton ijturton at gmail.com
Mon Oct 4 17:34:03 CEST 2010


On Mon, Oct 4, 2010 at 11:01 AM, Robert Buckley
<robertdbuckley at yahoo.com> wrote:
> Hi,
>
> I was wondering if anyone has seen example of selecting a group of features
> using a rectangle? ie..using a control similar to the Zoombox to select all
> features falling within it.
>

See http://openlayers.org/dev/examples/select-feature.html

The key part seems to be

select: new OpenLayers.Control.SelectFeature(
                    vectors,
                    {
                        clickout: false, toggle: false,
                        multiple: false, hover: false,
                        toggleKey: "ctrlKey", // ctrl key removes from selection
                        multipleKey: "shiftKey", // shift key adds to selection
                        box: true
                    }
                ),


Ian


-- 
Ian Turton


More information about the Users mailing list