关于openlayers6初始化地图与5的区别之一
初始化一个map,6:
this.map = new Map({
target: 'map_container',
layers: [ new TileLayer({
source: new ol.source.OSM()
})],
view: new View({
center:fromLonLat([88.434653, 31.559746]),
zoom: 7,
maxZoom: 15,
minZoom: 0,
//5的写法
// center: [88.434653, 31.559746],
// projection: 'EPSG:4326',
})