// JavaScript Document $(window).resize(function() {}); $(document).ready(function(){ //var isIE = /msie/.test(navigator.userAgent.toLowerCase()); var IE8=!$.support.leadingWhitespace; $("#in_slide").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"fold",autoPlay:true,trigger:"click",delayTime:1000,interTime:4000}); if($(".notice .bd li").length>1){ $(".notice .bd ul > style").remove(); $(".notice").slide({mainCell:".bd ul", autoPage:true, effect:"topLoop", autoPlay:true, delayTime:700, opp:false}); } $("#picnews").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"fold",autoPlay:true,trigger:"click"}); var fixnavTop=550; $(window).scroll(function () { if ($(window).scrollTop() > fixnavTop) { $(".fixnav").addClass("fixed"); } else { $(".fixnav").removeClass("fixed"); } }); require( [ 'echarts', 'BMap', 'echarts/chart/bar', 'echarts/chart/line', 'echarts/chart/map' ], function (echarts, BMapExtension) { if(IE8){//ie8 var map = new BMap.Map("map_main"); }else{ var BMapExt = new BMapExtension($('#map_main')[0], BMap, echarts,{ minZoom:5,maxZoom:6, enableMapClick: false }); var map = BMapExt.getMap(); } //特高压线条样式 var convertLineData = function (n) { var mydata = lineDataTgy[n]; var ldata = []; for (var j = 0; j < mydata.length; j++) { for (var i = 0; i < mydata[j][0].length-1; i++) { ldata.push([{name:mydata[j][0][i]},{name:mydata[j][0][i+1],value:mydata[j][1]}]); } } return ldata; } //特高压样式设定 var effect = { show: true, scaleSize: require('zrender/tool/env').canvasSupported ? 1 : 2, period: 50, // 运动周期,无单位,值越大越慢 color: 'rgba(255,255,255,0.5)', shadowColor: 'rgba(255,255,255,1)', shadowBlur : 10 }; function itemStyle(idx) { return { normal: { color:'rgba(30,144,255,0)', borderWidth:2, lineStyle: { type: ['solid','solid','dashed','dashed'][idx] }, label: { show: false, formatter: null, textStyle: {fontSize: 10} } } } }; option0 = { color: linecolor_a, legend:{ show:true, orient: 'vertical',//vertical, horizontal x:'right', y:360, padding:15, itemGap: 6, selectedMode:'single', data: [{name:titleData2[0][0],icon : 'line'}, {name:titleData2[0][1],icon : 'line'}, {name:titleData2[0][2],icon : 'image://'+jspath+btnIcon[2]}, {name:titleData2[0][3],icon : 'image://'+jspath+btnIcon[3]}, {name:'显示全部',icon : 'bar'}], textStyle : { color: '#000', fontSize:12 } }, series : [ { name: titleData2[0][0], type: 'map', mapType: 'none', roam: false,//scale move hoverable: false, clickable: false, itemStyle:{ normal:{ borderColor:'rgba(255,255,255,1)', borderWidth:0.5, label:{ show:false, position:'right', formatter: '{b}' }, areaStyle:{ color: 'rgba(194,204,203,0.8)' } }, emphasis: { label:{show:false,position:'top'}, areaStyle:{ color: 'rgba(194,204,203,1)' } } }, data:[], markLine : { symbol: ['circle', 'arrow'], symbolSize : 0, effect : effect, clickable: true, itemStyle : itemStyle(0), smooth:true, smoothness:0, data : convertLineData(0) } }, { name: titleData2[0][1], type: 'map', mapType: 'none', data:[], markLine : { symbol: ['circle', 'circle'], symbolSize : 0, effect : effect, clickable: true, itemStyle : itemStyle(1), smooth:true, smoothness:0, data : convertLineData(1) } }, { name: titleData2[0][2], type: 'map', mapType: 'none', data:[], markLine : { symbol: ['circle', 'circle'], symbolSize : 0, effect : effect, clickable: true, itemStyle : itemStyle(2), smooth:true, smoothness:0, data : convertLineData(2) } }, { name: titleData2[0][3], type: 'map', mapType: 'none', data:[], markLine : { symbol: ['circle', 'circle'], symbolSize : 0, effect : effect, clickable: true, itemStyle : itemStyle(3), smooth:true, smoothness:0, data : convertLineData(3) }, geoCoord: geoData[0] } ] }; } ); });