wandergis / arcgis-echarts3

A plugin for ArcGIS JS API to load echarts3 map and Make big data visualization easier.
http://wandergis.github.io/arcgis-echarts3/examples/
MIT License
358 stars 148 forks source link

Arcgis 穿透地图点击事件 #6

Open q2434006 opened 7 years ago

q2434006 commented 7 years ago

你好: 源代码如下 n.style.height = e.height + "px", n.style.width = e.width + "px", n.style.top = 0, n.style.left = 0, ---- e.container.appendChild(n) ---- e.container.children[0].appendChild(n), this._init(e, t) 使用 e.container.appendChild(n) 时 arcgis 地图图层内的点无法点击(无法触发点击事件), 使用 e.container.children[0].appendChild(n) 时 arcgis地图图层内可以点击,但是 ECharts 无法触发鼠标移上去事件(ToolTips)

SCLGIS commented 6 years ago

不需要穿透事件的,你把加载图标的画布顺序调整一下就行。 this._map = e; var n = this._echartsContainer = document.createElement("div"); n.style.position = "absolute", n.id = "echarts_for_esri_maps", n.style.height = e.height + "px", n.style.width = e.width + "px", n.style.top = 0, n.style.left = 0, e.container.querySelector('.esri-view-root').querySelector('.esri-view-surface').appendChild(n), this._init(e, t)