src/components/mapol.vue
@@ -93,6 +93,7 @@ }); }, methods: { init2DMap() { var vectorLayer = new TileLayer({ source: new XYZ({ @@ -111,6 +112,7 @@ center: [105.02, 34.9], zoom: 4, projection: "EPSG:4326", minZoom: 4, }), controls: defaultControls().extend([ new FullScreen(), @@ -132,7 +134,7 @@ //二维/三维地图切换 changeMapType() { // debugger // this.show2DMap = !this.show2DMap; //二维 if (this.show2DMap) {