处理问题

This commit is contained in:
wanggeng 2022-09-27 12:02:11 +08:00
parent d0f8deb1a1
commit 5e1fb34846
2 changed files with 4 additions and 4 deletions

View File

@ -353,7 +353,7 @@ BaiduMap.prototype.setDefaultConfig = function () {
// 缩放结束
self.map.addEventListener('zoomend', function (event) {
var zoom = this.getZoom();
if (zoom < 15) {
if (zoom < 16) {
self.setLabelFontSize(0);
} else {
self.setLabelFontSize(12);
@ -693,7 +693,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: self.gridOption.const.LABEL_FONT_SIZE + 'px'
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));

View File

@ -359,7 +359,7 @@ BaiduMap.prototype.setDefaultConfig = function () {
// 缩放结束
self.map.addEventListener('zoomend', function (event) {
var zoom = this.getZoom();
if (zoom < 15) {
if (zoom < 16) {
self.setLabelFontSize(0);
} else {
self.setLabelFontSize(12);
@ -764,7 +764,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: self.gridOption.const.LABEL_FONT_SIZE + 'px'
fontSize: 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));