this is my code:
google.maps.event.addListener(marker, 'rightclick', function(event) {
//delete marker
var nowIndex1='nowIndex1';
function callback1(element, index){
if(marker == element) nowIndex1=index
}
markers.forEach(callback1)
if(nowIndex1!='nowIndex1') markers.removeAt(nowIndex1)
//delete path
var nowIndex2='nowIndex2';
function callback2(element, index){
if(event.latLng == element) nowIndex2=index
}
path.forEach(callback2)
if(nowIndex1!='nowIndex1') path.removeAt(nowIndex2)
marker.setMap(null)
})
and the error is "event is undefined"
so what should i do .
thanks