原文:https://blog.csdn.net/jiangshi0/article/details/84618569
1.百度地图标注点上,去掉的背景色百度地图API开发之. 添加文字标签 Lable:去掉的背景色
/*标签*/ function createLable(map, point, content) { var opts = { position: point, offset: new BMap.Size(-5, 10) } var label = new BMap.Label(content, opts); label.setStyle({ color: "#000", border: "0px", backgroundColor: "0.000000000001", //通过这个方法,去掉背景色 fontSize: "12px", height: "20px", lineHeight: "20px" }); map.addOverlay(label); return label; }