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. Cheers, -- 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 _______________________________________________ Dev mailing list Dev@openlayers.org http://openlayers.org/mailman/listinfo/dev