Please help me with this.
I am creating a right click context menu on a map marker.
See here – http://jsfiddle.net/WEZVX/2/
I need to pass the markers ‘id’ parameter to the items function.
see lines
// add menu item
menu.add('Request Update', 'update',
function(){
console.log(id);
menu.close();
});
do i need to wrap this in another function?
Please check this is ok
What i did was wrap it like this
this passes the id but keeps adding new items to the list each time the menu is created.
so i added
this.items = [];after the overlay is created.seems to be working.