废话不说直接上代码
影像图
<template>
<div>
<div>影像图</div>
<div class="map" id="olMap"></div>
</div>
</template>
<script>
import "ol/ol.css";
import {
Tile as TileLayer } from "ol/layer";
import XYZ from "ol/source/XYZ";
import Map from "ol/Map.js";
import View from "ol/View.js";
export default {
data() {
return {
map: null,
};
},
mounted() {
this.initMap();
},
methods: {
initMap()