[OpenLayers-Users] need help with
Imran Rajjad
rajjad at gmail.com
Tue Jun 8 12:13:18 EDT 2010
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 <rajjad at 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
More information about the Users
mailing list