The context menu control allows you to create a right-click menu to expose any custom functions.
new ALKMaps.Control.ContextMenu({ 'ctxMenuItems': [ { separator: false, text: 'Zoom In', onclick: function(evt) { alert(evt); }}, { separator: true }, { separator: false, text: 'Zoom Out', onclick: function(evt) { alert(evt); }} ], })
This will produce a menu like this:
ALKMaps. | The context menu control allows you to create a right-click menu to expose any custom functions. |
Properties | |
handleRightClicks | {Boolean} Whether or not to handle right clicks. |
autoActivate | {Boolean} Activate the control when it is added to a map. |
ctxMenuItems | |
menuItems | Obsolete. |
Constructor | |
ALKMaps. | Create a new context menu control |