ThinkGeo.com    |     Documentation    |     Premium Support

Map_Double Click and Map_Click Events

Hi,


I'm having some problems getting the Double Click and Click events to work on the map.  In my application I can get the Double Click event to fire but when it fires the Click Event fires on the map too.  Is this how it's supposed to work?  I thought that maybe that only the Double Click event would be fired. 


In order to try and find out more I tried a simple test on the Display A Simple Map sample that comes with the product.  What I did in this scenario was add the event handler for the Map.Click Event and Map.Double Click event.  In this simple sample the Map.Click event always fired but the Double Click event never would.  I'm wondering if there is some bugs with these events or if I'm doing something wrong.


Can you tell me how the events are supposed to work?


Thanks!



Clint, 
  
 First, I need to mention a property which sets the default operations on map (like double click to zoom in, scroll the wheel to zoom in / out), 
 Map1.MapTools.MouseMapTool.Enabled  
 If it is set to true (by default), we have the functions enabled, otherwise they are not. 
  
 In the current version (3.0.131) 
  
 If Map1.MapTools.MouseMapTool.Enabled = true, DoubleClick event can never be raised while Click event can be raised.  
 If Map1.MapTools.MouseMapTool.Enabled = false, there is a conflicts between the 2 events and the appearance is sometimes DoubleClick is raised while sometimes Click is raised. 
  
 This is definitely confusing and in the upcoming version (will be available around 22th this month), we will implement in this way: 
 The property Map1.MapTools.MouseMapTool.Enabled will have nothing to do with if the event will be raised or not, it purely just represents if the default operations are enabled. 
 If Click event is hook up to some methods, DoubleClick event will never be raised, the Click event will be raised after the fist click.  It’s like what a WinForm does, we think that’s kind of a standard and that’s why we do it like this. 
  
 Let me know for any queries or suggestions about this. 
  
 Thanks, 
  
 Ben