There is no context menu on right click when you SetDrawMode to Polygon, Line, or Point. Is there a workaround to make this work?
Some DrawModes don't allow right click to bring up ContextMenu
Rob,
Sorry; OpenLayers doesn’t support context menu as well as web browser; it’s impossible to implement it if we don’t change OpenLayers library. Context menu is implemented by us but we need maintain OpenLayers library as higher priority. If we change OpenLayers library, it’ll be very difficult to maintain and upgrade in the future.
I’m not sure why you want to implement context menu while tracking. Please provide us more information to see whether we have better ideas.
Thanks,
Howard
I have a context menu setup on the map to quickly jump to different map modes. It is really confusing for the users that they can only right click on the map in some modes. For example, if they enter Polygon mode, and then decide they want to go back to Normal (so they can drag/zoom), there is no way for them to accomplish this, without introducing more controls on the page.
My main goal, is to have things be consistent and intuitive, no matter which mode you are in.
Rob,
Sorry, I guess it’s impossible to implement it without changing OpenLayers library; because web doesn’t contains right click event. We can only implement on mouse down event and judge whether mouse left button left or right is clicked. The OpenLayers implement the mouse down event to add a point for drawing shapes in some mode which is conflict with the mouse down event we used; so that the context menu cannot raise.
It’s not easy to implement this feature and hard to maintain OpenLayers library if we change it.
Sorry for the inconvenience.
Thanks,
Howard