<div class="layui-col-md6 border-style" style="background-color:white"> <!--百度地图显示的地方--> <div style=" height: 840px; width:100%;" id="container"></div> </div>
//加载地图 //在指定的容器内创建地图实例 var map = new BMap.Map("container", {enableMapClick: false});
解决方法
css添加样式:
#container { width: 100%; height: 100vh; margin-bottom: -15px; overflow: hidden; margin: 0; font-family: "微软雅黑"; } #container .anchorBL img { display: none; } #container .BMap_cpyCtrl span { display: none !important; ; }