js4.0版本图形的信息框显示问题

我在地图上新建了一个graphiclayer,在上面添加graphic,怎么配置都会弹出信息框,我想不弹出信息框
已邀请:

徐鸿至

赞同来自:

目前4.0 api 接口还不太完善,没找到相关禁用接口,可以直接暴力移除:

document.getElementById('esri_widgets_Popup_0').remove()

popup的id 一般是这个,可以用开发者工具自己确认一下

徐晨光 - 70后IT男,网名:君子8818

赞同来自:

建议用featureLayer,原因有二:(1)它是graphicLayer的扩展,(2)popupEnabled可实现楼主的禁用功能:原文Indicates whether to display popups when features in the layer are clicked.

官网链接:https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source

 

rongc

赞同来自:

经验证,4.1版本已解决该问题。

要回复问题请先登录注册