html, body, #map{padding:0;margin:0;height:100%;width:100%;
}.mouse-position-wrapper{width:300px;height:29px;color:#FF00FF;position:absolute;right:20px;bottom:6px;z-index:999;
}.ol-rotate{right:40px;
}.ol-scale-line{left:180px;
}.ol-zoomslider{top:120px;left:9px;
}
varmap;functioninit(){//封装底图函数
functiongetBaseLayer(layername, layer){return newol.layer.Tile({
title:layername,
source:newol.source.XYZ({
url:"http://t4.tianditu.com/DataServer?T="+layer+"&x={x}&y={y}&l={z}"})
});
};//封装标注图层
functiongetAnnoLayer(layername, layer, visiable){return newol.layer.Tile({
title:layername,
source:newol.source.XYZ({
url:"http://t4.tianditu.com/DataServer?T="+layer+"&x={x}&y={