Context menu |
You can add your own actions to the context menu of the map. This is accomplished by addMapAction function.
Available parameters:
menuPosition | {Integer} Item in the context menu, which is slated for the new action (value >= 0). |
caption | {String} The caption of the action. |
icon | {String} URL icon for the action. |
callback | {Function} The function starts when you select action from the context menu. |
map.addMapAction(2, 'New Action', 'Icon', event);
An example of the action:
You can remove your own actions from the context menu of the map. This is accomplished by removeMapAction.
Available parameters:
menuPosition | {Integer} Item in the context menu, which is designed to remove the action (value> = 0). |
map.removeMapAction(1);
setInfoCallback function
Assigns the function caused by any use of the information action on the map. Data to be transmitted substitution function included:
Available parameters:
callback | {Function} The additional service information action. |
An example of the action:
map.setInfoCallback(info); //wywołanie funkcji setInfoCallback info = function() { alert('Additional information'); //window with additional information }