37 lines
755 B
Vue
37 lines
755 B
Vue
<template>
|
|
<v-chart class="chart w-h-full" :option="option" />
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { reactive } from 'vue'
|
|
import { use, registerMap } from "echarts/core";
|
|
import { CanvasRenderer } from 'echarts/renderers'
|
|
import { Map3DChart } from 'echarts-gl/charts';
|
|
import VChart from "vue-echarts";
|
|
|
|
import tmskMap from "../assets/geojson/659003.json";
|
|
|
|
use([ CanvasRenderer, Map3DChart ]);
|
|
|
|
registerMap('tmsk', tmskMap);
|
|
|
|
const option = reactive({
|
|
backgroundColor: 'rgba(6,30,93,.5)',
|
|
series: {
|
|
type: 'map3D',
|
|
map: 'tmsk',
|
|
label: {
|
|
show: true
|
|
},
|
|
itemStyle: {
|
|
color: '#999',
|
|
borderWidth: 1,
|
|
},
|
|
shading: 'color'
|
|
}
|
|
});
|
|
|
|
const update = () => console.log
|
|
|
|
defineExpose({ update })
|
|
</script> |