Closed yuxincs closed 7 years ago
Sorry, i don't think this feature is necessary everywhere, so i am not merging this PR.
Maybe you can fix this by
var layer = echartInstance.getModel().getComponent('amap').getLayer();
layer.setzIndex(200)
See the /index.html
file of this project.
Oh yes you're correct, the code makes sense.
Currently the echarts layer (which is the AMap's CustomLayer)'s zIndex is not set and the default seems to be 11, however the amap-labels and amap-markers layer's zIndex's default value seems to be 99 and 120. Thus the echarts layer is not on top of all layers which in turn mouse operations won't have any effect on the echarts instances.
Setting the zIndex when creating the CustomLayer will fix the problem.