Disable CSS Styles in Google Maps (3.14) Infowindow

前端 未结 11 1057
再見小時候
再見小時候 2021-02-05 02:39

In google maps version 3.14 there are some new css rules added for the custom infowindow. I use the infobox plugin and now many of my elements styles are overwritten.

Fo

11条回答
  •  长情又很酷
    2021-02-05 03:13

    I had the same problem and Emads answer worked well for me after I addet a event listener.

    google.maps.event.addListener(map, 'idle', function()
    {
        jQuery('.gm-style').removeClass('gm-style');
    });
    

    The problem is I still can't see any way to stop google loading the Roboto font.

    EDIT: Well... there is a pretty easy way, to stop that. Just use GET to load an older version of the google API like this:

    
    

    In this API verion, google won't change the gm-style at all. So you don't need to override any classes or styles.

提交回复
热议问题