我正在使用官方的Styled Maps Wizard制作自定义Google Map。
但是,似乎无法更改标签的字体系列(即Arial)。
有谁知道这在Google Maps中是否可行?
最佳答案
( EDIT :我现在看到的原始问题是关于 native Google Map标签,而不是自定义标记标签。对于我的原始答复,即,关于Marker Labels的自定义字体系列,请继续阅读...)
快进到2018年...
如果您调用Google Maps API,则可以使用自定义Google字体。这是documentation on font-family。
创建新的google.maps.Marker时,您需要指定fontFamily
选项的label
选项。我使用了Google Fonts的字体,例如:
var marker = new google.maps.Marker({
position: posiiton,
map: map,
label: {
text: 'Label text',
fontFamily: "'Domine', serif",
}
});
关于google-maps - 更改Google Maps标签的字体系列?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13606441/