關於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',
        })


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM