[OpenLayers-Users] Util.extend: I can't unregister

Franz1965 fsozzi at INTERCAD.CH
Wed Jan 29 08:44:42 PST 2014


Hi everybody,

I create a custom control to develop a function for selecting features by
use of the code below. Everything works fine, but I don't know how to
unregister this control to go back to pan mode. I've tried to remove this
control from map, but this function continues to be activated.

Any idea?

Best regards


           ///selection control: if shift is pressed a selection is made
            _selectcontrol = new OpenLayers.Control();
            OpenLayers.Util.extend(_selectcontrol, {
                draw: function () {
                    // this Handler.Box will intercept the shift-mousedown
                    // before Control.MouseDefault gets to see it
                    this.box = new OpenLayers.Handler.Box(_selectcontrol,
                            { "done": this.notice },
                            { keyMask: OpenLayers.Handler.MOD_NONE });
                    this.box.activate();
                },
                notice: selectRectangle
            });
            _map.addControl(_selectcontrol);/



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Util-extend-I-can-t-unregister-tp5100759.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list