google maps v3 marker info window on mouseover

前端 未结 3 1056
执念已碎
执念已碎 2020-12-13 01:34

I have scoured stackoverflow and other forums including the google maps v3 api docs for an answer but I cannot find how to change the event that fires the marker info window

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-13 02:12

    Thanks to duncan answer, I end up with this:

    marker.addListener('mouseover', () => infoWindow.open(map, marker))
    marker.addListener('mouseout', () => infoWindow.close())
    

提交回复
热议问题