Toggle navigation
echarts扩展百度地图迁徙
By
阳光的Only丶
2017-01-13 10:09:12
脚本
16
21
作品使用的第三方脚本
http://api.map.baidu.com/api?v=2.0&ak=uHkkRqHOFj3Z6Ajv3lLhCD8WjYjb6rFM,/dep/echarts/latest/extension/bmap.min.js
数据管理
上传数据
支持小于 5M 任意格式(csv, xlsx, json, xml, ...)的数据文件
上传后可以通过生成的文件链接异步获取托管的数据。
历史数据
0 条
无历史数据
代码修改记录
信息提示
保存作品
对当前截图不满意?你还可以
上传本地截图
重新截图
作品名称
作品描述
标签
geo
grid
legend
markLine
markPoint
bar
effectScatter
line
lines
map
timeline
title
toolbox
tooltip
visualMap
作品默认版本
最新
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20:11:45
图表已生成
整理代码
刷新
代码
var geoCoorddata = { '武汉': [114.30539299999998, 30.593099], '深圳': [114.05786499999999, 22.543096], '北京': [116.40739499999995, 39.904211], '阿克苏': [80.26338699999997, 41.167548] }, option = { bmap: { center: [113.65, 34.76], zoom: 5, roam: true, mapStyle: { styleJson: [{ 'featureType': 'land', //调整土地颜色 'elementType': 'geometry', 'stylers': { 'color': '#081734' } }, { 'featureType': 'building', //调整建筑物颜色 'elementType': 'geometry', 'stylers': { 'color': '#04406F' } }, { 'featureType': 'building', //调整建筑物标签是否可视 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'highway', //调整高速道路颜色 'elementType': 'geometry', 'stylers': { 'color': '#015B99' } }, { 'featureType': 'highway', //调整高速名字是否可视 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'arterial', //调整一些干道颜色 'elementType': 'geometry', 'stylers': { 'color': '#003051' } }, { 'featureType': 'arterial', 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'green', 'elementType': 'geometry', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'water', 'elementType': 'geometry', 'stylers': { 'color': '#044161' } }, { 'featureType': 'subway', //调整地铁颜色 'elementType': 'geometry.stroke', 'stylers': { 'color': '#003051' } }, { 'featureType': 'subway', 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'railway', 'elementType': 'geometry', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'railway', 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'all', //调整所有的标签的边缘颜色 'elementType': 'labels.text.stroke', 'stylers': { 'color': '#313131' } }, { 'featureType': 'all', //调整所有标签的填充颜色 'elementType': 'labels.text.fill', 'stylers': { 'color': '#FFFFFF' } }, { 'featureType': 'manmade', 'elementType': 'geometry', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'manmade', 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'local', 'elementType': 'geometry', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'local', 'elementType': 'labels', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'subway', 'elementType': 'geometry', 'stylers': { 'lightness': -65 } }, { 'featureType': 'railway', 'elementType': 'all', 'stylers': { 'lightness': -40 } }, { 'featureType': 'boundary', 'elementType': 'geometry', 'stylers': { 'color': '#8b8787', 'weight': '1', 'lightness': -29 } }] } }, series: [{ type: 'lines', mapType: 'china', coordinateSystem: 'bmap', zlevel: 1, data: [{ name: '武汉', toname: '北京', coords: [geoCoorddata['武汉'], geoCoorddata['北京']] }, { name: '深圳', toname: '北京', coords: [geoCoorddata['深圳'], geoCoorddata['北京']] }, { name: '阿克苏', toname: '北京', coords: [geoCoorddata['阿克苏'], geoCoorddata['北京']] }], //线上面的动态特效 effect: { show: true, period: 6, trailLength: 0.7, color: '#fff', symbolSize: 4 }, lineStyle: { normal: { width: '', color: '#a6c84c', curveness: 0.2 } } }, { type: 'effectScatter', mapType: 'china', coordinateSystem: 'bmap', zlevel: 3, data: [{ name: '北京', value: geoCoorddata['北京'].concat(200) }, ], rippleEffect: { period: 10, scale: 5, brushType: 'fill' }, }] }; myChart.setOption(option);