layers: [ //創(chuàng)建一個使用Open Street Map地圖源的圖層 new ol.layer.Tile({ source: new ol.source.OSM() }), //加載一個geojson的矢量地圖 new ol.layer.Vector({ source: new ol.source.Vector({ url: 'geojson/map.geojson', // 地圖來源 format: new ol.format.GeoJSON() // 解析矢量地圖...