So, unfortunately, the right click events are not delivered to us by the browser... rather we sort of goof them through in the <br>OpenLayers.Control.Navigation<br><br>So... I am not a whiz on the whole Control / Handler relationship, but the hacked way I was able to get it to work is this:<br>
<br><br> var myNavControl = new OpenLayers.Control.Navigation({ <br> handleRightClicks: true <br> });<br><br><br>
map = new OpenLayers.Map('map', { controls: [<br> myNavControl,<br><div id=":4u" class="ArwC7c ckChnd"> new OpenLayers.Control.PanZoomBar(),<br>
new OpenLayers.Control.NavToolbar(),<br>
new OpenLayers.Control.LayerSwitcher()<br>
]});</div> <br> //note that this has to come *after* the map is initialized since it is precisely when<br> // the nav control is added to the map that its draw() is called, which is when its <br>
// handler.click is created.<br> ///<br> myNavControl.<span class="objectBox objectBox-text">handlers.click.callbacks.rightclick = function() { alert('boo'); }<br></span><br><span class="objectBox objectBox-text"><br>
...now there *must* be a sexier way of doing that... and i'll leave it up to the dev list and those more versed in using the handlers to perhaps help us out here. In the meantime, though, that should work for you.<br>
<br>Thanks again for the great bug report :-)<br>Erik<br><br></span><br><div class="gmail_quote">On Thu, Oct 23, 2008 at 5:46 PM, Chris Rankin <span dir="ltr"><<a href="mailto:rankincj@yahoo.com">rankincj@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">--- On Thu, 23/10/08, Erik Uzureau <<a href="mailto:euzuro@gmail.com">euzuro@gmail.com</a>> wrote:<br>
> can you let us know if that fixes your problem?<br>
<br>
</div>Thanks for doing that, Erik. It doesn't fix my problem with my custom right-click event not being run, although I am sure that the default mouseup() handler is running for a right-click event. Is my registered function supposed to be run via the call to<br>
<br>
this.callback('rightclick', [evt])<br>
<br>
in the rightclick() function in Click.js?<br>
<br>
Thanks,<br>
<font color="#888888">Chris<br>
<br>
<br>
<br>
<br>
</font></blockquote></div><br>