[OpenLayers-Dev] Multi Layer Select

Richard Ive richard at xanox.net
Mon Oct 5 08:47:22 EDT 2009


Hi All,

I'm trying to figure out a solution to a problem, but unfortunately I'm not
having much luck so I was wondering if anyone had any ideas.

I have two Vector layers that each have their own features. I need all
features to be selectable, but each layer should have it's own select rules
eg:

Layer1 = multi-select: false
Layer2 = multi-select: true

The example below means Layer1 & Layer2 have multi-select, however that's
not what I need.

Any help would be greatly appreciated.


            selectControl = {

                select: new OpenLayers.Control.SelectFeature(
                    [Layer1,Layer2],
                    {
                        clickout: false, toggle: true,
                        multiple: true, hover: false,
                        toggleKey: "ctrlKey", // ctrl key removes from
selection
                        multipleKey: "shiftKey", // shift key adds to
selection
                        onSelect: onFeatureSelect,
                        onUnselect: onFeatureUnselect
                    }
                ),
                navigate: new OpenLayers.Control.Navigation()
            }


-- 
Regards,
Richard Ive.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20091005/5b6bddca/attachment.html


More information about the Dev mailing list