AtlasCT.com
User Manual v5.0

ContextMenu

The ContextMenu class allows you to add a right click context menu to the map.
You should define a ContextMenu object and then attach the instance to the required map(s).


Summary
The ContextMenu class allows you to add a right click context menu to the map.
You should define a ContextMenu object and then attach the instance to the required map(s).
The ContextMenu constructor.
Adds a new item to the context menu.
Returns all menu items.
Removes an item from the context menu.

Constructors

ContextMenu

ContextMenu()

The ContextMenu constructor.  Creates a new ContextMenu instance.

Methods

addItem

addItem(string caption
function callback
boolean separatorBefore)

Adds a new item to the context menu.

Parameters

captionthe new item caption.
callbackthe callback function to be called after the user presses the menu item.
separatorBeforetrue to add a separator before the item, false to add only the menu item.

See Also

removeItem

getItemsList

Array[] getItemsList()

Returns all menu items.

Returns

The menu items.

removeItem

removeItem(string caption)

Removes an item from the context menu.

Parameters

captionthe caption of the item to be removed.

See Also

addItem

ContextMenu()
The ContextMenu constructor.
addItem(string caption
function callback
boolean separatorBefore)
Adds a new item to the context menu.
removeItem(string caption)
Removes an item from the context menu.
Array[] getItemsList()
Returns all menu items.