I am currently working with a drawing tool for the ESRI Flex API, and every time I double-click the mouse a map service will perform a measurement and display the length of the line that I am drawing.

I want to mimic this double-click manually by dispatching a MouseEvent.DOUBLE_CLICK, but the map service is not listening to this default Flex event. I suspect that the API has created a custom MapMouseEvent or something like it that is being dispatched when a user double-clicks the mouse.

Does anyone know which event is being dispatched when I double-click the mouse on the map?

  • Do you mean clicking twice, or clicking both the right and left buttons?
    – Nathanus
    Commented May 13, 2011 at 21:06
  • Clicking twice.
    – Kyle
    Commented May 13, 2011 at 21:16

3 Answers 3


You should get the effect you want if you add your MouseEvent to the map and disable whatever event is firing that is interfering. I would guess that the problem is that the event for double-click zooming is firing. You can disable it by using the map's doubleClickZoomEnabled property.

If your problem is that you want to add a graphic to the screen that has special functionality and otherwise you'd like double clicking to perform as usual then this post:


should be sufficient to fix that problem.


Does anyone know which event is being dispatched when I double-click the mouse on the map?

Multiple events are dispatched, including the standard DOUBLE_CLICK. Among the Flex API samples there is an "Events" example which you can play with to see this: http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=EventBasics


After playing around with the API a bit, I found a solution. One thing I learned is that even custom events need to listen to the built-in Flash events (e.g. MouseEvent.DOUBLE_CLICK) in order to dispatch their own events.

The Flex API actually dispatches a number of events when a double-click is fired, including a MapMouseEvent.MAP_CLICK, MouseEvent.MOUSE_DOWN, MouseEvent.MOUSE_UP, and MouseEvent.DOUBLE_CLICK events (in that order). The MapMouseEvent is a crucial step in the series - it seems like the draw tool will listen for this event to be dispatched before listening for other mouse events (like a double-click).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.