关于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',
        })
posted @ 2020-08-06 15:50  wwj007  阅读(864)  评论(0编辑  收藏  举报
……