I also try this syntax.. but still no luck
function onclick(evt) { console.log(evt.type); } function ondblclick(evt) { console.log(evt.type); } //selectCtrl is global selectCtrl = new OpenLayers.Control.SelectFeature(vector_layer, { clickout: true, // unselect if clicked outside // onSelect:onFeatureSelect, // functions to be called // onUnselect:onFeatureUnselect, box : false } ); handler = new OpenLayers.Handler.Click( selectCtrl, { 'click':onclick, 'dblclick':ondblclick }, null ); On Tue, Jun 8, 2010 at 8:35 PM, Imran Rajjad <raj...@gmail.com> wrote: > Hi list, > > I need a litle help with the synatx of implementing handler.drag. See > I want to triger functions at drag start and drag end or mouse down > and mouse up in this box selection control. I`m not too sure about the > syntax as the documentation has no examples, What am I doing wrong > here? > > > var selectCtrl = new OpenLayers.Control.SelectFeature(vector_layer, > {clickout: true, // unselect if clicked outside > onSelect:onFeatureSelect, // functions to be called > onUnselect:onFeatureUnselect, > box : true, > handlers:{new OpenLayers. Handler.Drag(this,{ > > mouseup:function(evt){console.log('up');}, > > mousedown:function(evt){console.log('down');}, > })} > } > ); > > > regards. > Imran > -- > I.R > -- I.R _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users