Reputation: 33
At our company we use a self-developed web application (I helped to develop it). One part of that application loads day-specific data from a database (jobs to do that day), asks Google maps for the correct coordinates and shows each job on the map). Because those jobs can be clustered we use a custom tooltip, which pops up when we hoover a marker, to show some in-depth information about that job, without having to click on it.
This part did the trick for 4-5 years now (there are more events, but this is the only one that uses parameters in the triggered function):
google.maps.event.addListener(localOrderMarker,'mousemove',function(){hideToolTip();showToolTip(event,'some example text',200)});
But since the October 11 2015 update of the Google maps api v3 the first parameter of the "showToolTip" stays "undefined". Before that update the MouseEvent was passed, so we knew the exact location of the mouse-cursor but using the clientX and clientY properties. But now that does not work anymore :(
I am trying to find a solution. I did a lot of searching (almost 2 full working days now) and tried many things, but till now nothing worked.
Hopefully someone understands what's happening and can point me to a solution. Any help is appreciated.
Upvotes: 1
Views: 1517
Reputation: 117324
this may be a possible workaround:
google.maps.event.addListener(localOrderMarker, 'mousemove', function(){
google.maps.event.addDomListenerOnce(document, 'mousemove', function(event){
hideToolTip();
showToolTip(event,'some example text',200);
});
});
Upvotes: 1