| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- function initSecondMap(uploadedDataURL,mapWorkOrder,points,num){
- let myChart = echarts.init(document.getElementById('regionMap'));
- var option = null;
- $.getJSON(uploadedDataURL, function(geoJson) {
- console.log(geoJson)
- echarts.registerMap('js', geoJson);
- myChart.hideLoading();
- option = {
- // tooltip: {
- // trigger: 'item',
- // textStyle: {
- // color: '#fff',
- // fontSize: '16',
- // fontWeight: '600'
- // },
- // position: 'top',
- // backgroundColor: 'rgba(250,250,250,0)',
- // transitionDuration: 0.4,
- // formatter: function(params) {
- // return '<div class="frame" style="background: url(image/hotline_pie.png) no-repeat;width:208px;height:100px;background-size: 100% 100%;text-align:center;top:20px;"><div class="frameC">' +
- // params.name + '今日受理量<br>'+params.value+'</div></div>';
- // }
- // },
- visualMap: {
- show: true,
- max: 2653,
- seriesIndex: [0],
- right: 100,
- bottom:100,
- calculable: true,
- inRange: {
- color: ['#fffb00', '#ff0100']
- }
- },
- geo: [{
- map: 'js',
- roam: false, //是否允许缩放
- zoom: num, //默认显示级别
- right: 100,
- // bottom:200,
- scaleLimit: {
- min: 0,
- max: 3
- }, //缩放级别
- itemStyle: {
- normal: {
- // areaColor: '#013C62',
- shadowColor: '#013C62',
- shadowBlur: 20,
- shadowOffsetX: -5,
- shadowOffsetY: 15,
- }
- },
- tooltip: {
- show: false
- }
- }],
- series: [
- //地图
- {
- type: 'map',
- mapType: 'js',
- geoIndex: -1,
- zoom: num, //默认显示级别
- right: 100,
- // bottom:200,
- label: {
- show: false,
- color: '#222',
- offset: [-20, -20],
- emphasis: {
- color: 'white',
- show: false
- }
- },
- itemStyle: {
- normal: {
- borderColor: '#2980b9',
- borderWidth: 1,
- areaColor: '#12235c'
- },
- emphasis: {
- // areaColor: '#FA8C16',
- borderWidth: 0,
- color: 'green'
- }
- },
- data: mapWorkOrder
- },
- {
- type: 'effectScatter',
- coordinateSystem: 'geo',
- showEffectOn: 'render',
- rippleEffect: {
- period: 2,
- scale: 3,
- brushType: 'fill'
- },
- // symbol:'none',
- hoverAnimation: true,
- label: {
- formatter: '{b}',
- position: 'right',
- offset: [-20, -20],
- color: '#000000',
- fontWeight:600,
- show: true
- },
- itemStyle: {
- opacity:1,
- color: 'rgba(250,250,250,0)',
- // normal: {
- // color: '#00fcff',
- // shadowBlur: 1,
- // borderWidth:1,
- // shadowColor: '#00fcff'
- // }
- },
- emphasis: {
- show: false,
- itemStyle: {
- opacity: 1, //线条宽度
- }
- },
- data: points
- }
- ]
- };
- myChart.setOption(option);
- })
- }
|