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