[OpenLayers-Users] double clicks on button control
    Dave Rafkind 
    drafkind at traversetechnologies.com
       
    Thu Jun 17 12:36:40 EDT 2010
    
    
  
Hello list, anyone know how to get a Button control added to the map to 
consume and ignore double click events? I want to let the normal 
handling of double click events (ie the zooming) work if the user double 
clicks on the map normally. Also I would prefer not to have to patch 
OpenLayers if at all possible. Here's my code:
   var  extentControl =new  OpenLayers.Control.Button({
       displayClass:'olControlZoomToMaxExtent',
       title:"Zoom to extent of site",
       trigger:function  () {
           map.zoomToExtent(sitesLayer.getDataExtent());
       }
   });
   var  controls = [
       // other controls also added to this list
       
       extentControl
      
    ];
    var  panel =new  OpenLayers.Control.Panel({
        'displayClass':'olCustom',
        defaultControl: controls[0]
    });
panel.addControls(controls);
    map.addControl(panel);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100617/50bf1a99/attachment.html
    
    
More information about the Users
mailing list