Documentation

Custom menu link in popup

Almost all the geometries on Micello map has a popup attached to it. Now there may be times when you want to add your custom menu link into default popup menu.

In this demo, by mapClick override event we can customize default popup to add custom menu link. You can see at line 55 we are calling AddToMenu function which will add menu item to menuItems array. Here in this demo we want this custom menu link to be at number two after info link, so we added it at second position in menuItems array.

As you can see at line 76 in the code Menu item object will have two properties, name and a call back function. Name will be the display name in the popup, and function will be the action attached to the menu link.