Finally, with the great help of Eric, a patch has been created: <a href="http://trac.openlayers.org/ticket/2528">http://trac.openlayers.org/ticket/2528</a><div><a href="http://trac.openlayers.org/ticket/2528"></a>Cédric<br>
<br><div class="gmail_quote">2010/3/17 Cédric Moullet <span dir="ltr"><<a href="mailto:cedric.moullet@camptocamp.com">cedric.moullet@camptocamp.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Yep. This gave me goos ideas to solve the problem in the following way:<div><br></div><div><div> this.handleRightClicks = true;</div><div class="im"><div> this.handler = new OpenLayers.Handler.Click(this, {</div>
<div>
rightclick: this.getInfoForClick</div></div><div> }, {</div><div> "single": true</div><div> });</div><div><br></div><div><font color="#888888">Cédric</font><div>
<div></div><div class="h5"><br><br><div class="gmail_quote">2010/3/17 Eric Lemoine <span dir="ltr"><<a href="mailto:eric.lemoine@camptocamp.com" target="_blank">eric.lemoine@camptocamp.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2010/3/17 Eric Lemoine <<a href="mailto:eric.lemoine@camptocamp.com" target="_blank">eric.lemoine@camptocamp.com</a>>:<br>
<div><div></div><div>> 2010/3/17 Cédric Moullet <<a href="mailto:cedric.moullet@camptocamp.com" target="_blank">cedric.moullet@camptocamp.com</a>>:<br>
>> Hi,<br>
>> I'd like to have the OpenLayers.Control.WMSGetFeatureInfo working on the<br>
>> right mouse click instead of the left mouse click.<br>
>> I tried to modify it in the following way<br>
>> (<a href="http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Control/WMSGetFeatureInfo.js#L195" target="_blank">http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Control/WMSGetFeatureInfo.js#L195</a>)<br>
>> this.handler = new OpenLayers.Handler.Click(this,<br>
>> {rightclick: this.getInfoForClick},<br>
>> this.handlerOptions.click || {});<br>
>> But without success. Could you give me a hint in order to support right<br>
>> mouse click with this control ?<br>
><br>
> you also need double:true in the handler options. This can be set by<br>
> providing the following in the control options:<br>
><br>
> handlerOptions: {<br>
> click: {<br>
> "double": true,<br>
> "single": false<br>
> }<br>
> }<br>
><br>
> Then it should work.<br>
><br>
> But I think the control should do<br>
><br>
> this.handler = new OpenLayers.Handler.Click(this, {<br>
> click: this.getInfoForClick,<br>
> rightclick: this.getInfoForClick<br>
> }, this.handlerOptions.click || {});<br>
><br>
> so that providing appropriate handler options to the could would<br>
> suffice to make it work on rightclick.<br>
<br>
</div></div>Sorry I mixed up "double" and "rightclick". It's a bit late here! I<br>
hope you get the idea.<br>
<div><div></div><div><br>
--<br>
Eric Lemoine<br>
<br>
Camptocamp France SAS<br>
Savoie Technolac, BP 352<br>
73377 Le Bourget du Lac, Cedex<br>
<br>
Tel : 00 33 4 79 44 44 96<br>
Mail : <a href="mailto:eric.lemoine@camptocamp.com" target="_blank">eric.lemoine@camptocamp.com</a><br>
<a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><div class="im">-- <br>Geospatial Director Camptocamp SA<br>Cédric Moullet<br>PSE A<br>CH-1015 Lausanne<br><a href="http://www.camptocamp.com" target="_blank">www.camptocamp.com</a> / <a href="http://www.mapfish.org" target="_blank">www.mapfish.org</a> / <a href="http://twitter.com/cedricmoullet" target="_blank">twitter.com/cedricmoullet</a> / <a href="http://mapfishblog.blogspot.com/" target="_blank">mapfishblog.blogspot.com/</a><br>
<br>+41 79 759 69 83 (mobile)<br>+41 21 619 10 21 (direct)<br>+41 21 619 10 10 (centrale)<br>+41 21 619 10 00 (fax)<br>
</div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Geospatial Director Camptocamp SA<br>Cédric Moullet<br>PSE A<br>CH-1015 Lausanne<br><a href="http://www.camptocamp.com">www.camptocamp.com</a> / <a href="http://www.mapfish.org">www.mapfish.org</a> / <a href="http://twitter.com/cedricmoullet">twitter.com/cedricmoullet</a> / <a href="http://mapfishblog.blogspot.com/">mapfishblog.blogspot.com/</a><br>
<br>+41 79 759 69 83 (mobile)<br>+41 21 619 10 21 (direct)<br>+41 21 619 10 10 (centrale)<br>+41 21 619 10 00 (fax)<br>
</div>