Open ThomasXing opened 3 years ago
代码:
geo3D: { map: 'china', // boxWidth: 100, boxHeight: 20, shading: "color", colorMaterial: { detailTexture: mapTexture, // detailTexture: '/earth/echarts/gradient.png', }, environment: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: '#00aaff' // 天空颜色 }, { offset: 0.7, color: '#998866' // 地面颜色 }, { offset: 1, color: '#998866' // 地面颜色 }], false), label:{ show: true, distance: 0, color: '#FFFFFF', formatter:function(params){ if(params.name.indexOf('内蒙古' || '黑龙江') > -1) return params.name return params.name.slice(0,2) } }, emphasis:{ label:{ show: true, } }, light: { main: { intensity: 1 }, ambient: { intensity: 0 }, ambientCubemap: { diffuseIntensity: 1, texture: '/earth/echarts/data-1491896094618-H1DmP-5px.hdr' } }, itemStyle: { // opacity: 0.5, borderWidth: 1, borderColor: 'rgba(0, 134, 254,.5)' }, postEffect: { enable: true, bloom: { enable: true }, screenSpaceAmbientOcclusion: { radius: 1, intensity: 1, enable: true, quality: 'high' }, screenSpaceReflection: { enable: true }, }, }, myChart.on('geoselectchanged', function(event){ console.log(event) }) myChart.getZr().on('click', function (event) { console.log(event) if (!event.target) { // 点击在了空白处,做些什么。 } });
遇到了同样的问题,按着官方文档说法,geo和geo3d参数是通用,但是我把selectedMode设置为single,依然不能触发geoselectchanged事件
插个眼,遇到同样的问题
相同问题 咋解决噢
代码: