Get Position of Mouse Cursor on Mouseover of Google Maps V3 API Marker

后端 未结 6 680
名媛妹妹
名媛妹妹 2020-12-01 16:39

I am trying to make a div visible at the position of the cursor when the cursor mouseover a marker using jQuery. Its kind of like a tooltip. However I cannot se

6条回答
  •  暖寄归人
    2020-12-01 17:02

    The solution that works for me is more straight forward:

    map.data.addListener('mouseover', function (event) {
        posX = event.ub.clientX;
        posY = event.ub.clientY;
    });
    

提交回复
热议问题