在庐山市里面新增一个庐山
在线编辑
完整代码
<template>
<div>
<div class="midPart">
<!-- <div class="mapEchart" ref="mapEchart"></div> -->
<div class="mapEchart" id="lnMap" ref="mapEchart"></div>
</div>
</div>
</template>
<script>
import * as echarts from "echarts";
import store from "../store";
export default {
name: "CityMap",
describtion: "城市地图",
props: {
// title: {
// type: String,
// default: "",
// },
},
data() {
return {
initMapChart: "",
};
},
mounted() {
this.initSMap();
},
methods: {
initSMap() {
let that = this;
let name = "bj";
// let uploadedDataURL = require("../assets/plugins/echarts/jiujiang_geo.json");
let uploadedDataURL = require("../assets/plugins/echarts/map.json");
that.initMapChart = this.$echarts.init(document.getElementById("lnMap"));
that.$echarts.registerMap(name, uploadedDataURL);
let _data = [
{
name: "修水县",
type: 0,
selected: true,
},
{
name: "永修县",
type: 1,
selected: false,
},
{
name: "武宁县",
type: 2,
selected: false,
},
{
name: "瑞昌市",
type: 3,
selected: false,