<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
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:<br>
<br>
<pre style="font-family: consolas;">&nbsp; <span style="color: blue;">var</span>&nbsp;extentControl&nbsp;=&nbsp;<span
 style="color: blue;">new</span>&nbsp;OpenLayers.Control.Button({
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;displayClass:&nbsp;<span style="color: maroon;">'olControlZoomToMaxExtent'</span>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;title:&nbsp;<span style="color: maroon;">"Zoom&nbsp;to&nbsp;extent&nbsp;of&nbsp;site"</span>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trigger:&nbsp;<span style="color: blue;">function</span>&nbsp;()&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;map.zoomToExtent(sitesLayer.getDataExtent());
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;});
 
 
&nbsp;&nbsp;<span style="color: blue;">var</span>&nbsp;controls&nbsp;=&nbsp;[
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // other controls also added to this list
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;"></span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extentControl
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;];
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;<span style="color: blue;">var</span>&nbsp;panel&nbsp;=&nbsp;<span
 style="color: blue;">new</span>&nbsp;OpenLayers.Control.Panel({
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: maroon;">'displayClass'</span>:&nbsp;<span
 style="color: maroon;">'olCustom'</span>,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;defaultControl:&nbsp;controls[0]
&nbsp;&nbsp;&nbsp;});</pre>
<title>Snippet</title>
<pre style="font-family: consolas;">panel.addControls(controls);
&nbsp;&nbsp;&nbsp;map.addControl(panel);</pre>
</body>
</html>