Google将样式添加到地图容器中,以覆盖我的样式。
我知道怎么解决这个问题。但是API (v3.8/9/exp)也加载了我并不真正需要/想要的webfont "Roboto“。
是否有任何设置/选项/方法来解决这个问题?
我可以阻止API添加额外的CSS吗?
这是google-maps API添加到我的页面的<head>
中的代码:
<style type="text/css">
.gm-style .gm-style-cc span,
.gm-style .gm-style-cc a,
.gm-style .gm-style-mtc div {
font-size:10px
}
</style>
<link type="text/css"
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700">
<style type="text/css">
@media print {
.gm-style .gmnoprint,
.gmnoprint {
display:none
}
}
@media screen {
.gm-style .gmnoscreen,
.gmnoscreen {
display:none
}
}
</style>
<style type="text/css">
.gm-style {
font-family: Roboto,Arial,sans-serif;
font-size: 11px;
font-weight: 400;
text-decoration: none
}
</style>
https://stackoverflow.com/questions/25523806
复制相似问题