[OpenLayers-Users] Capturing mouse events
Mike Leahy
mgleahy at alumni.uwaterloo.ca
Thu Jul 22 21:48:54 EDT 2010
That does work for right-click, although it's not as tidy. What confuses me
is that it would seem that based on the documentation that there are specific
functions meant for handling these events in the click handler class:
http://dev.openlayers.org/docs/files/OpenLayers/Handler/Click-js.html
Am I misinterpreting that?
On Thursday, July 22, 2010 21:07:33 Phil Scadden wrote:
> Not sure how OpenLayers handles it, but fir html, how about
> onContextMenu event? For mouse handling, I am pretty sure you can only
> reliably pick right button in onMousedown event
> --
> Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St,
> Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232
>
> Notice: This email and any attachments are confidential. If received in
> error please destroy and immediately notify us. Do not copy or disclose
> the contents.
> On Thursday, July 22, 2010 18:58:39 Mike Leahy wrote:
> > 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/b17b8af1/attachment.html
More information about the Users
mailing list