Disable CSS Styles in Google Maps (3.14) Infowindow

前端 未结 11 1019
再見小時候
再見小時候 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:22

    Since Google changed the behavior of older versions it wont work anymore to load v1.13. The new styles and roboto-font will always load. My new solution is to save every stylesheet into a separate file and include the following script:

    google.maps.event.addListener(map, 'idle', function()
    {
    
        $('style').remove();
    
    });
    

    This will remove every style-tag written by googles api and keeps your own style save but the roboto font will still be loaded. I don't see any way to stop that.

提交回复
热议问题