Google Maps InfoBox with click handlers and scrollbar

前端 未结 1 1613
逝去的感伤
逝去的感伤 2020-12-07 02:06

I have an application using the Google Maps javscript API and the Infobox plug-in (customizable version of the native InfoWindow).

It was working fine until I had th

相关标签:
1条回答
  • 2020-12-07 02:34

    Just in case you're still working on this one, you need to change your map options to turn off panning/zooming when the mouse enters the infobox. You can use something like this:

    $(document).delegate("div#ib", "mouseenter", function() {
    
        theMap.setOptions({
           draggable: false,
           scrollwheel: false
        });
        console.log("mouse enter detected");
    
    });
    
    $(document).delegate("div#ib", "mouseleave", function() {
        theMap.setOptions({
            draggable: true,
            scrollwheel: true
        });
        console.log("mouseleave detected");
    });
    
    0 讨论(0)
提交回复
热议问题