<template>
  <div id="map">
  </div>
</template>

<script>
import * as echarts from "echarts";
import "echarts-gl";
import WUXI from "@/assets/wuxi.json";
export default {
  data() {
    return {}
  },
  methods: {
    initMap () {
      echarts.registerMap("wuxi", WUXI);
      let chart = echarts.init(document.querySelector("#map"))
      chart.setOption({
        series: [{
          type: 'map3D', // map、map3D
          map: 'wuxi' // 注册的地图名称
        }]
      })
    }
  },
  computed: {},
  mounted() {
    this.initMap()
  }
}
</script>

<style scoped lang="scss">
#map {
  width: 100%;
  height: 100%;
}
</style>
