Disable CSS Styles in Google Maps (3.14) Infowindow

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

    Instead of removing the class through DOM manipulations and instead of using an older Google Maps version which is obviously mostly unwanted, simple deactivate the style globally by resetting the font attribute:

    .gm-style { font: initial !important; }
    

    or put your Google Map into a container and style .gm-style inside your container:

    [google map component here]

    and in your CSS style definitions:

    .MapContainer .gm-style { font: initial; }
    

提交回复
热议问题