地图使用相关json

2019-07-17  本文已影响0人  BabyMT

1绘制地图需要的json

https://share.weiyun.com/5unL8p5

import echarts from 'echarts'
const geoJson = require('./../ChinaMap.json')

echarts.registerMap('china', this.geoJson)
const dom = this.$refs.map
this.myChart = echarts.init(dom)
this.myChart.setOption(option)
this.myChart.resize()

geoJson提供了绘制中国地图的json数据

2城市坐标json

https://share.weiyun.com/5TVRa3v

// eg:这是北京坐标,完整的请下载json
{
        "name": "北京市",
        "log": "116.46",
        "lat": "39.92",
        "children": [
            { "name": "北京", "log": "116.46", "lat": "39.92" },
            { "name": "平谷", "log": "117.1", "lat": "40.13" },
            { "name": "密云", "log": "116.85", "lat": "40.37" },
            { "name": "顺义", "log": "116.65", "lat": "40.13" },
            { "name": "通县", "log": "116.67", "lat": "39.92" },
            { "name": "怀柔", "log": "116.62", "lat": "40.32" },
            { "name": "大兴", "log": "116.33", "lat": "39.73" },
            { "name": "房山", "log": "115.98", "lat": "39.72" },
            { "name": "延庆", "log": "115.97", "lat": "40.47" },
            { "name": "昌平", "log": "116.2", "lat": "40.22" }
        ]
    }

全国各个区域的经纬度json
……………………………………………………………………………………………………
如果对你有用还请点赞哦
……………………………………………………………………………………………………

上一篇下一篇

猜你喜欢

热点阅读