先看看效果图
chart.gif
新建html
china.json获取地址
http://datav.aliyun.com/tools/atlas/#&lat=30.37018632615852&lng=106.68898666525287&zoom=3.5
新建js文件(使用的jquery)
$(function () {
"use strict"
$.ajax({
url: 'https://geo.datav.aliyun.com/areas_v2/bound/100000.json',
success: function(data) {
var flyingLines = document.getElementById('flying-lines')
var chart = echarts.init(flyingLines)
echarts.registerMap('china', data)
// 地区索引, 也可以根据名称查找,逻辑调整下就行
var areaIndex = [9, 3, 4, 14, 27, 18, 19]
var coor = []
for(var i = 0; i< areaIndex.length; i++) {
coor.push({
name: data.features[areaIndex[i]].properties.name,
v