wandergis / arcgis-echarts3

A plugin for ArcGIS JS API to load echarts3 map and Make big data visualization easier.

Home Page:http://wandergis.github.io/arcgis-echarts3/examples/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Arcgis 穿透地图点击事件

q2434006 opened this issue · comments

你好:
源代码如下
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)

不需要穿透事件的,你把加载图标的画布顺序调整一下就行。
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)