Insert a new contextmenu menu item at a specific index

insertItemContextmenu(map, option, index)

Arguments

map

a map widget object created from leaflet

option

new menu item to add

index

Index of the contextmenu. (NOTE: Since the index is passed to JavaScript, it is zero-based)

Value

A leaflet map object