guanzongjiang opened a new issue, #19990:
URL: https://github.com/apache/echarts/issues/19990

   ### Version
   
   5.5.0
   
   ### Link to Minimal Reproduction
   
   暂无,里面有些geo数据无法展示
   
   ### Steps to Reproduce
   
   发现一个问题,我想实现地图下钻的功能,代码实现如下,先加载了默认地图数据【map】,然后绑定了点击事件,处理点击事件时,切换map为map2, 
然后调用goback重置options时,效果不符合预期
   
   var options = {
       tooltip: {},
       geo: {
           map: 'map',
           regions: [],
       },
       series:[
           {
               type: "map",
               geoIndex: 0,
               data: [],
           }
       ],
   };
   
   onMounted(async () => {
       mapData = ...;
       mapData2 = ...;
   
       mapDom = document.getElementById('map');
   
       myChart = echarts.init(mapDom);
       mapData = await util.getGeoData();
       echarts.registerMap("map", mapData);
       myChart.setOption(options);
       myChart.on('click', e => {
           echarts.registerMap("map2", mapData2);
           options.geo.map = "map2";
           myChart.setOption(options);
       })
   
   })
   
   function goback() {
       echarts.registerMap("map", mapData);
       options.geo.map = "map";
       myChart.setOption(options);
   }
   
   
   
   ### Current Behavior
   
   goback触发后,出现以下问题
   1. 发现第一次点击的区域没被选中,但是当我鼠标滑过上次点击的区域时又被选中了,并且离开该区域后,选中状态不会消失
   2. 后来我试了下设置options时,指定notMerge为true,当我返回上一步时,重复1步骤都同样不会被选中,但是滑过选中区域时也不会被选中
   3. options里面没有series时,不会出现以上情况,也不会记录被选中的区域
   
   ### Expected Behavior
   
   1. 返回上一步时能选中上次点击的区域
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to