You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2019/10/16 08:29:35 UTC

[GitHub] [incubator-echarts] chaochao11 opened a new issue #11418: echarts bmap 滚动事件和页面滚动事件发生冲突

chaochao11 opened a new issue #11418: echarts bmap 滚动事件和页面滚动事件发生冲突
URL: https://github.com/apache/incubator-echarts/issues/11418
 
 
   echarts 里面使用bmap嵌套百度地图
   如果一开始echarts 不在页面可视区域之内,需要滚动滚动条才能展示地图,
   问题:这种情况在用滚动事件放大echarts的bmap的地图就会出现当前放大的位置不知道在哪
   
   echarts 版本
   ```
   "echarts": "^4.3.0",
   ```
   echarts配置
   ```
   {
         tooltip: {
           trigger: "item",
           padding: 0,
           formatter: (param) => {
             return `<section class="tooltip">
                       <span>发震时刻:${param.data.happenTime}</span><br />
                       <span>经度:${param.data.longitude}</span><br />
                       <span>纬度:${param.data.latitude}</span><br />
                       <span>深度:${param.data.depth}</span><br />
                       <span>震级:${param.data.level}</span><br />
                       <span>参考位置:${param.name}</span>
                   </section>`;
           },
         },
         bmap: {
           center: [116, 39.92], // 中心点
           zoom: 1,
           roam: true, // 可放大缩小
           mapStyle: {
             styleJson: [
               {
                 "featureType": "all",
                 "elementType": "geometry",
                 "stylers": {
                   "hue": "#007fff",
                   "saturation": 89
                 }
               },
               {
                 "featureType": "water",
                 "elementType": "all",
                 "stylers": {
                   "color": "#ffffff"
                 }
               }
             ]
           }
         },
         series: [
           {
             name: "地震",
             type: "scatter",
             coordinateSystem: "bmap",
             label: {
               normal: {
                 show: false,
               },
               emphasis: {
                 show: false,
               },
             },
             data:[{
               name: "新疆喀什地区伽师县",
               depth: 10,
               happenTime: "2019-10-08 22:21:49.0",
               latitude: "39.84",
               level: "3.0",
               longitude: "77.17",
               symbolSize: [14, 18],
               value: [77.17 , 39.84],
               symbol: `image://${locationBlue}`,
             },{
               name: "台湾宜兰县海域",
               depth: 10,
               happenTime: "2019-10-08 22:21:49.0",
               latitude: "24.70",
               level: "3.0",
               longitude: "122.48",
               symbolSize: [14, 18],
               value: [122.48,24.70],
               symbol: `image://${locationBlue}`,
             },{
               name: "吉林松原市宁江区",
               depth: 10,
               happenTime: "2019-10-08 22:21:49.0",
               latitude: "45.23",
               level: "3.0",
               longitude: "124.69",
               symbolSize: [14, 18],
               value: [124.69 , 45.23],
               symbol: `image://${locationBlue}`,
             }],
             itemStyle: {
               emphasis: {
                 borderColor: "#fff",
                 borderWidth: 1,
               },
             },
           },
         ],
       };
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org