-1

On my map, the corresponding infobox closes on marker mouseout event. But I dont want to close the infobox when the cursor is over it.

How can i do this? Tried with is(":hover"), but didn't work.

My Code:

var ib = new InfoBox(infoBoxOptions);
 google.maps.event.addListener(marker, "mouseover", function () {
ib.Open();
});  
.maps.event.addListener(marker, 'mouseout', function () {
ib.close()           
});
manu5987
  • 69
  • 1
  • 7
  • possible duplicate of [Google Maps API: infoWindow flickers/closes automatically because of mouseout event](http://stackoverflow.com/questions/17164544/google-maps-api-infowindow-flickers-closes-automatically-because-of-mouseout-ev) – Dr.Molle Jun 24 '13 at 18:19
  • I updated my code with the above solution i.e added google.maps.event.addListenerOnce(map, 'mousemove', function(){ infoWindow.close(); }); to mousemove event, but it doesn't work for me – manu5987 Jun 25 '13 at 04:57

1 Answers1

0
 google.maps.event.addListener(map, 'mousemove', function () {
                //
                if ($("#infoboxwrapper").is(":hover")) {



                } else {

                    ib.close();

                }
            });

Cheked if the infobox is hovered in mousemove event. Calling mousemove event inside markers mouseout event helped.

manu5987
  • 69
  • 1
  • 7