Toggle navigation
盐城地图--光伏电站位置图
By
帝***基
2019-08-08 01:47:05
脚本
16
21
作品使用的第三方脚本
数据管理
上传数据
支持小于 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 uploadedDataURL = "/asset/get/s/data-1565167628683-H2UBzGr37.geojson"; // var uploadedDataURL = "/asset/get/s/data-1565146237296-6kBrnYkc-.geojson"; var mtPath = "path://M515.9 949.5c-10.6 0-16.4-1.3-20.1-5.6-2.2-2.6-227-269.5-287-398.7-21.6-46.3-33.1-96.5-33.1-145.6 0-185 152.6-335.4 340.2-335.4s340.2 151.5 340.2 337.6c0 56.2-10.5 98.7-36.4 146.6-71.4 132.4-281.2 392.3-283.3 394.9-2.5 3.1-7 6.2-19.9 6.2h-0.6z m0-679.3c-72.1 0-130.8 58.7-130.8 130.8s58.7 130.8 130.8 130.8S646.7 473.1 646.7 401c0.1-72.1-58.6-130.8-130.8-130.8z" $.get(uploadedDataURL, function(nantong) { echarts.registerMap('yancheng', nantong); // 指定图表的配置项和数据 var option = { tooltip: { trigger: 'item', backgroundColor: 'rgba(166, 200, 76, 0.82)', borderColor: '#FFFFCC', showDelay: 0, hideDelay: 0, enterable: true, transitionDuration: 0, extraCssText: 'z-index:100', formatter: function(params, ticket, callback) { //根据业务自己拓展要显示的内容 var res = ""; var name = params.name; var value = params.value; res = "
" + value[2] + "
" + value[3]; return res; } }, grid: { top: 20, bottom: 20, }, // backgroundColor:"#2b2b2b", geo: { map: 'yancheng', aspectScale:'1', zoom: 1.2, label: { normal:{ position: [10, 10], show: true, color: 'grey' }, emphasis: { show: false } }, roam: true, //是否允许缩放 itemStyle: { normal: { color: 'rgba(7,157,233,0.4)', //地图背景色 // borderColor: '#516a89', //省市边界线00fcff 516a89 borderColor: '#ddd', borderWidth: 1 }, emphasis: { show: false, // color: 'rgba(37, 43, 61, .5)' //悬浮背景 color:'#3093d8' } } }, series: [ { type: 'graph', coordinateSystem: 'geo', zlevel: 2, rippleEffect: { brushType: 'stroke' }, label: { normal: { show: true, position: 'right', formatter: '{b}' } }, symbolSize: 18, symbolKeepAspect: true, itemStyle: { normal: { color: '#545', }, emphasis: { areaColor: '#2B91B7' } }, data: [ { symbol: mtPath, itemStyle:{ normal:{color:"#fff"} }, // name: '响水场站', value: [119.907418,34.425561,'响水场站','2019年6月投入运营'] }, { symbol: mtPath, itemStyle:{ normal:{color:"#fff"} }, // name: '大丰场站', value: [120.651218,33.18941,'大丰场站','2019年6月投入运营'] }, { symbol: mtPath, itemStyle:{ normal:{color:"#fff"} }, // name: '建湖场站', value: [119.836568,33.448473,'建湖场站','2019年6月投入运营'] }, { symbol: mtPath, itemStyle:{ normal:{color:"#fff"} }, // name: '盐城', value: [120.172957,33.360686,'响水场站','2019年6月投入运营'] } ] } ] }; myChart.on('click', function(param) { }); myChart.setOption(option); })