[OpenLayers-Dev] How to use right-click to finish drawing a Polygon in OpenLayers?

Devdatta Tengshe devdatta at tengshe.in
Tue Nov 26 20:58:38 PST 2013


I'm using OpenLayers 2.13 and the DrawFeature control. By Default, the
Polygon is completed, when you double click.
Some of our clients are requesting that we allow the mouse right-click, to
finish the polygon.
I tried adding a rightclick function to the OpenLayers.Handler.Polygon
class, but it is never called.
I also confirmed that the right click event is being registered in the
activate method of the OpenLayers.Handler class.

How do I override this default behavior to allow the mouse right-click to
finish the polygon?

Regards,
Devdatta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20131127/d3459e14/attachment.html>


More information about the Dev mailing list