Google Maps API V3 InfoBox using jQuery fadeIn and fadeOut

后端 未结 6 1238
Happy的楠姐
Happy的楠姐 2021-02-06 05:18

I have searched the web high and low and have not been able to find a tutorial or example of using jQuery to fade an InfoBox/InfoWindow in Google Maps not the content the actual

6条回答
  •  既然无缘
    2021-02-06 06:05

    I am using the google utility library marker with label (http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1.5/docs/examples.html)

    It is easy to use jquery on the labels.

    google.maps.event.addListener(marker, "mouseover", function (e) { 
        //console.log(this); this.label.labelDiv_.style.display = 'block'; 
        $(this.label.labelDiv_).fadeIn();
    });
    
    google.maps.event.addListener(marker, "mouseout", function (e) { 
        //this.label.labelDiv_.style.display = 'none'; 
        $(this.label.labelDiv_).fadeOut();
    });
    

提交回复
热议问题