I have a marker on the map with some event handler bound to it.
google.maps.event.addListener(marker, 'mouseover', function(){
infoWindow.open(map, marker);
});
How do I get the event handler without assigning the handler a global name? such as:
var h = function(){
infoWindow.open(map, marker);
}
google.maps.event.addListener(marker, 'mouseover', h);
This is too complex.
What I am looking for is like marker.mouseover (just like a DOM element) but this does not work.
Just found an alternative.
trigger(instance:Object, eventName:string, var_args:*)will trigger the event bound. And this fulfill almost all needs.