创建地图: //OSM图层 let source = new ol.source.OSM() //切片图层tilelayer let layers = new ol.layer.Tile({ source: source,//图层来源 opacity:1,//透明度,默认为1 visible:true,//是不显示,默认true extent:[100,34,103,36],//可选参数,图层渲染范围,[minLon,minLat,maxLon,maxLat] zIndex:1,//图层渲染索引