字体问题
This commit is contained in:
parent
5e1fb34846
commit
c9c269b5bd
@ -296,6 +296,9 @@ BaiduMap.prototype.setLabelFontSize = function (size) {
|
||||
for (var i = 0, label; label = this.labelArray[i++];) {
|
||||
label.show();
|
||||
label.setOffset(new BMap.Size(-label.content.length * size / 2, -size / 2));
|
||||
label.setStyle({
|
||||
fontSize: size + 'px'
|
||||
})
|
||||
}
|
||||
}
|
||||
// 获得Map对象
|
||||
|
@ -302,6 +302,9 @@ BaiduMap.prototype.setLabelFontSize = function (size) {
|
||||
}
|
||||
label.show();
|
||||
label.setOffset(new BMap.Size(-label.content.length * size / 2, -size / 2));
|
||||
label.setStyle({
|
||||
fontSize: size + 'px'
|
||||
})
|
||||
}
|
||||
}
|
||||
// 获得Map对象
|
||||
@ -764,7 +767,7 @@ BaiduMap.prototype.initBackgroundGrid = function (option) {
|
||||
border: 'none',
|
||||
backgroundColor: 'transparent',
|
||||
textShadow: '1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff',
|
||||
fontSize: fontSize: '0px'
|
||||
fontSize: '0px'
|
||||
});
|
||||
label.setOffset(new BMap.Size(-backgroundGrid.label.length * self.gridOption.const.LABEL_FONT_SIZE / 2, -self.gridOption.const.LABEL_FONT_SIZE / 2));
|
||||
label.setPosition(self.getCenterPoint(backgroundGrid.pointArray));
|
||||
|
Loading…
Reference in New Issue
Block a user