先看效果图
可以看出,图例中不仅展示了湖北省所有市的区域范围,而且随州市的三个行政区划也显示在其中,上完整代码
<template>
<div>
<div id="allMap" style="width: 1000px; height: 800px"></div>
</div>
</template>
<script>
import AllJson from '@/assets/json/All.json'; // 此json下面会具体讲
import * as echarts from 'echarts';
export default {
name: 'Demo',
data() {
return {
}
},
mounted() {
this.allMap();
},
methods: {
allMap() {
console.log("412")
var option = {
backgroundColor: "#041646",
title: {
show: true,
text: "湖北省",
top: '10',
textStyle: {
color: 'white'
},
l