[OpenLayers-Users] Capturing mouse events

Mike Leahy mgleahy at alumni.uwaterloo.ca
Thu Jul 22 18:58:39 EDT 2010


Hello list,

I'm taking a look at OpenLayers again, and I'm just trying to figure out how to 
effectively capture various mouse events.  Based on the examples provided, it's 
fairly straightforward to get click and double-click events.  But I don't seem 
to be able to figure out how to handle the right click event, or 
mouseup/mousedown events.

I've tried cobbling together a sample...and although I seem to be able to make 
something happen with mouseup and mousedown, these end up appearing as 'click' 
events.  As for a right-click event, I can't seem to capture that at all.  I'm 
sure this can be done, but I just don't understand the OpenLayers classes well 
enough to implement it.  Can someone look at the attached html file and 
identify where I'm going wrong?  If you drop it into the examples of the dev 
version of OpenLayers, it should work (at least in FireFox), and it'll write 
messages into a Firebug console.

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100722/dc7d071d/mouseevents.html


More information about the Users mailing list