removing default mouseover tooltip from marker in google-maps

后端 未结 3 1792
执念已碎
执念已碎 2021-01-14 01:28

I have created an application for showing an Information Window popup for markers, The application is working fine and the popup is showing correctly but the only solution i

3条回答
  •  青春惊慌失措
    2021-01-14 02:04

    You could manually remove the element title attribute on mouseover.

    Try changing

    google.maps.event.addListener(marker, 'mouseover', function () {
    

    To

    google.maps.event.addListener(marker, 'mouseover', function (e) {
        e.ya.target.removeAttribute('title');
    

    Also for Edge, you need to be change it to:

    e.ya.target.parentElement.removeAttribute('title')
    

    JSFiddle Link (Google Maps API not working)

提交回复
热议问题