如何使用Google Maps API v3在我的应用程序中更改标签标记的字体? 我改为拉托,仍然是“arial”,为什么? :( 代码:
.labels {
color: red;
background-image:url('testemark.png');
font-family: 'Lato', sans-serif;
font-size: 10px;
font-weight: bold;
text-align: center;
width: 77px;
padding-top:5px;
padding-left:7.5px;
height:23px;
}
var marker2 = new MarkerWithLabel({
position: new google.maps.LatLng(10,20),
map: map,
labelContent: "example2",
labelAnchor: new google.maps.Point(10, 20),
labelClass: "labels", // the CSS class for the label
});
THX
答案 0 :(得分:2)
将important
- 规则添加到以下格式:
font-family: 'Lato', sans-serif !important;