处理问题
This commit is contained in:
parent
d0f8deb1a1
commit
5e1fb34846
@ -353,7 +353,7 @@ BaiduMap.prototype.setDefaultConfig = function () {
|
|||||||
// 缩放结束
|
// 缩放结束
|
||||||
self.map.addEventListener('zoomend', function (event) {
|
self.map.addEventListener('zoomend', function (event) {
|
||||||
var zoom = this.getZoom();
|
var zoom = this.getZoom();
|
||||||
if (zoom < 15) {
|
if (zoom < 16) {
|
||||||
self.setLabelFontSize(0);
|
self.setLabelFontSize(0);
|
||||||
} else {
|
} else {
|
||||||
self.setLabelFontSize(12);
|
self.setLabelFontSize(12);
|
||||||
@ -693,7 +693,7 @@ BaiduMap.prototype.initBackgroundGrid = function (option) {
|
|||||||
border: 'none',
|
border: 'none',
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
textShadow: '1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff',
|
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.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));
|
label.setPosition(self.getCenterPoint(backgroundGrid.pointArray));
|
||||||
|
@ -359,7 +359,7 @@ BaiduMap.prototype.setDefaultConfig = function () {
|
|||||||
// 缩放结束
|
// 缩放结束
|
||||||
self.map.addEventListener('zoomend', function (event) {
|
self.map.addEventListener('zoomend', function (event) {
|
||||||
var zoom = this.getZoom();
|
var zoom = this.getZoom();
|
||||||
if (zoom < 15) {
|
if (zoom < 16) {
|
||||||
self.setLabelFontSize(0);
|
self.setLabelFontSize(0);
|
||||||
} else {
|
} else {
|
||||||
self.setLabelFontSize(12);
|
self.setLabelFontSize(12);
|
||||||
@ -764,7 +764,7 @@ BaiduMap.prototype.initBackgroundGrid = function (option) {
|
|||||||
border: 'none',
|
border: 'none',
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
textShadow: '1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff',
|
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.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));
|
label.setPosition(self.getCenterPoint(backgroundGrid.pointArray));
|
||||||
|
Loading…
Reference in New Issue
Block a user