单击地图上的事件可打开单层arcGIS 4.16的弹出窗口

问题描述

我在arcGIS地图中有一个图层列表,并要求在单击特定图层时添加弹出窗口。是否可以从层列表中检测所需的层并打开弹出窗口?当我应用文档中提供的示例代码时,有时弹出窗口突然消失。我相信是因为地图上有多个图层。我们如何实现呢?

view.on("click",function(event){
  view.popup.open({
   location: event.mapPoint,// location of the click on the view
   title: "You clicked here",// title displayed in the popup
   content: "This is a point of interest"  // content displayed in the popup
  });
});

我正在循环图层并将其添加到地图,例如:'map.add(layer [count])'。我不需要认弹出窗口,因为我必须从API获取数据并填充到弹出模板中。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)